Errors and retries
Which Nureta API errors to fix, which to retry and how long to wait, by HTTP status and error code.
Every error has the same shape:
{"error": {"code": "AccountOverdueError", "message": "..."}}Match on error.code, not on the message. A simple rule set:
| Status | What to do |
|---|---|
400, 404, 422 | Fix the request. Retrying the same body gives the same answer. Nothing was charged. |
401 | Check the key. |
403 AccountOverdueError | Add funds. |
409 | The task is in the wrong state. Read it again, then decide. |
429 | Wait 1–2 seconds (or the time in the RateLimit headers) and retry. |
503 | Wait the seconds in the Retry-After header and retry. service_maintenance also gives error.end_at. |
500 | Retry once after a few seconds. |
A task that fails after it was accepted (status: "failed") is always refunded. Its error.code says why: see Task errors.