From 6c08c1f549fc5009dee54cf3913947d35465c5f4 Mon Sep 17 00:00:00 2001 From: Emirlan Rasulov Date: Thu, 15 Oct 2026 11:26:13 +0600 Subject: [PATCH 1/2] docs(examples): handle subscription_inactive in the error-handling example The Batch API answers a valid key whose subscription is past due, unpaid, incomplete or paused with 401 code subscription_inactive. Show it next to unauthenticated so readers don't treat it as a bad key. --- examples/05_error_handling.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/05_error_handling.py b/examples/05_error_handling.py index 7ee7f21..e8971ce 100644 --- a/examples/05_error_handling.py +++ b/examples/05_error_handling.py @@ -36,6 +36,10 @@ def main() -> None: print(f"job missing or foreign: {exc.problem and exc.problem.detail}") case "unauthenticated": print("bad API key — check ZENROWS_API_KEY") + case "subscription_inactive": + # The key is valid; the subscription is past due, unpaid, + # incomplete or paused. Re-entering the key won't help. + print("subscription not active — fix it at app.zenrows.com/billing") case "payment_required": print("out of credits — top up at zenrows.com") case _: From 3dd647125cfc044450853c53ef130e6d5198874c Mon Sep 17 00:00:00 2001 From: Emirlan Rasulov Date: Thu, 15 Oct 2026 11:37:13 +0600 Subject: [PATCH 2/2] docs(examples): mention Azure Marketplace for an inactive subscription --- examples/05_error_handling.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/05_error_handling.py b/examples/05_error_handling.py index e8971ce..2b9106c 100644 --- a/examples/05_error_handling.py +++ b/examples/05_error_handling.py @@ -39,7 +39,10 @@ def main() -> None: case "subscription_inactive": # The key is valid; the subscription is past due, unpaid, # incomplete or paused. Re-entering the key won't help. - print("subscription not active — fix it at app.zenrows.com/billing") + print( + "subscription not active — fix it at app.zenrows.com/billing" + " (or in Azure Marketplace if you subscribed there)" + ) case "payment_required": print("out of credits — top up at zenrows.com") case _: