code is stable and safe to branch on. message is written for humans and may
change — don’t match on it. details appears only on validation failures, and
lists each offending field.
Codes
What to retry
Retry429 after the number of seconds in the Retry-After header. Don’t
retry sooner — it counts against the same window.
Retry 500 once or twice with backoff. Nothing was billed, so a retry can’t
double-charge.
Don’t retry anything else. 400, 401, 403, 404, 405 and 413 will
fail identically until you change the request, the key, or the plan. 402 will
keep failing until credits are added — retrying in a loop just wastes calls
against your rate limit.
None of these are billed
Every error above is free. You’re only charged for rows actually returned, so a failed call never draws credits — including500.
Distinguishing the two 403s
Both mean “your access is gone”, but the fix differs:membership_ended— you were removed from the team. Create a key from a team you’re still in.subscription_inactive— the team’s plan lapsed. Someone with billing access needs to renew.