max_credits_exceeded
The call could cost more than its
max_credits.Status
HTTP 402, title Max credits exceeded. One of the money errors. Branch on code, never on the status or the prose.
Retryable: no. Every body carries this as retryable: false, beside action and remedy: the same request will fail again until the request changes or a person acts.
Common causes
- The worst-case quote, what
estimate=truereturns, is abovemax_credits.
What to do
Action: Narrow the call until estimate_credits fits, or raise max_credits if the Customer allows.
Nothing ran or was charged. Ask for less (a smaller limit, fewer opt-ins) or raise max_credits.
Example
The body arrives as application/problem+json, with retryable and the remedy above. Most responses add detail about the occurrence, and some add fields of their own.
{
"type": "https://www.shortsintel.com/docs/reference/errors/max_credits_exceeded",
"title": "Max credits exceeded",
"status": 402,
"code": "max_credits_exceeded",
"retryable": false,
"action": "Narrow the call until `estimate_credits` fits, or raise `max_credits` if the Customer allows.",
"remedy": "Nothing ran or was charged. Ask for less (a smaller `limit`, fewer opt-ins) or raise `max_credits`."
}