Developer & tech

API Error Explainer

Quick answer

Enter an HTTP status code or API error and the tool explains the likely cause, whether the fault is yours or the server's, the concrete fixes to try in order, and whether retrying will help. It also flags which codes should trigger exponential backoff and which will never succeed on retry.

Half of debugging an integration is knowing whether the problem is yours, theirs, or the browser's. Start with the status code.

Published · Last updated

Recommended byAI Intelligence InternationalLovable Labs Platform
Try Lovable Free →

Or pick one

429

Too Many Requests

You exceeded a rate limit or quota.

Most likely causes

  • Bursting past requests-per-second
  • A loop firing per row instead of batching
  • Shared key hit by another service
  • Monthly quota exhausted

Try these in order

  1. 1. Honour the Retry-After header exactly
  2. 2. Add exponential backoff with jitter
  3. 3. Batch requests or add a queue with a fixed concurrency

Should you retry?

Retry with backoff — Retry-After if present, otherwise 1s, 2s, 4s, 8s.

What should you know about a quick way to narrow it down?

A 4xx is a statement about your request; a 5xx is a statement about their server. That one split decides whether you should be editing your code or reading a status page, and it saves more time than any other debugging habit.

Always read the response body. Providers put the useful detail — the offending field, a request ID, the reset time on a rate limit — in the body, and client libraries routinely throw it away in favour of a generic message. Log the body and the request ID from the headers before you log anything else.

A CORS message is the odd one out. It comes from the browser, not the API, and it usually means the request succeeded but the response was withheld from your JavaScript. Reproduce the same call with curl: if that works, the problem is entirely in headers.

What is the API Error Explainer?

What it answersCause, fixes and whether retrying helps.
How the answer is producedHTTP status codes are a small, fixed vocabulary, and almost every confusing API failure comes from one of a dozen of them.
What you need to enterEnter the status code and, if you have it, the response body — the body usually contains the real reason.
Where it stops being reliableMany APIs use status codes loosely, returning 200 with an error body or 400 for authentication problems.
Cost and sign-upFree, runs in your browser, no account and no stored inputs.

How is each status code interpreted?

HTTP status codes are a small, fixed vocabulary, and almost every confusing API failure comes from one of a dozen of them. The explainer maps the code to what the server is claiming, then separates the two questions that matter: is this your fault or theirs, and is retrying safe.

The 4xx family means the request was rejected — wrong credentials, malformed body, missing permission, rate limit. Retrying an identical 4xx almost always fails identically, with 429 the exception. The 5xx family means the server broke while handling a request it accepted, so retrying with backoff is usually correct.

For each code the tool lists the causes that produce the overwhelming majority of real-world occurrences, in the order worth checking, along with the specific header or response field that normally confirms the diagnosis.

How do you use the API Error Explainer?

  1. 1.Enter the status code and, if you have it, the response body — the body usually contains the real reason.
  2. 2.Work through the listed causes in order rather than guessing.
  3. 3.Check whether the code is retryable before adding retry logic; retrying a 400 forever is a common and expensive bug.
  4. 4.For rate limits, read the Retry-After header instead of inventing a delay.

What can this tool not tell you?

  • Many APIs use status codes loosely, returning 200 with an error body or 400 for authentication problems.
  • It cannot see your request, so it cannot tell you which specific field is malformed.
  • Provider-specific error codes carry more detail than the HTTP status and should be checked in their documentation.

What should you know about reading errors as a debugging shortcut, not a dead end?

An API error is the single cheapest debugging signal you get, because the server has already told you which category of problem occurred — you only need to translate it. Developers who skip straight to logging request payloads or adding retries lose that shortcut and end up rediscovering, by trial and error, information the status code already gave them for free. Treating the code as the first diagnostic step rather than an inconvenience to swallow turns a ten-minute investigation into a thirty-second one, especially under production pressure when a clear head is scarce.

Interpretation hinges on separating client fault from server fault before anything else, because the fix lives on opposite ends of the stack depending on which it is. A 4xx means your request needs to change — a header, a scope, a payload shape — and no amount of resilience engineering on the client will help. A 5xx means the fix is on the provider's side, and the correct client behaviour is patience with backoff, not investigation of your own request body, unless the same 5xx recurs on a request that previously succeeded.

What changes the answer most often is the response body, since providers frequently overload a single status code for several distinct failures — a 400 might mean bad JSON, an unknown field, or a value out of range, and only the body distinguishes them. The most common mistake is building retry logic before checking retryability, which turns a permanent authentication failure into an infinite loop that burns quota and hides the real problem from monitoring. Next, log the code and body together, and fix the loudest failing pattern first rather than every code in the reference table.

What do worked examples look like?

A 429 during a product launch spike

A checkout integration starts returning 429 only during a marketing push, not during normal traffic. The status confirms a rate limit rather than a bug, and the Retry-After header shows 12 seconds. The fix is a queue with backoff honouring that header, not a code review of the checkout logic — the endpoint and payload were correct all along, the volume simply exceeded the provider's short-window allowance.

A 401 that appears only after a few hours

A background job authenticates fine at startup, then starts failing with 401 partway through a long run. That pattern points to an expiring token rather than wrong credentials, since a wrong credential would fail immediately. The fix is refreshing the token proactively before expiry, not rotating the API key, which would leave the same expiry bug intact and reappear on the next long-running job.

What do people ask most about this tool?

What is the difference between 401 and 403?

401 means the server does not know who you are — the credential is missing, malformed or expired. 403 means it knows exactly who you are and you are not allowed to do this.

Should I retry a 500?

Yes, with exponential backoff and a retry cap. If the same request returns 500 consistently, it is a deterministic server bug and retrying will not help.

Why do I get 429 when I am under the documented limit?

Limits are frequently enforced per shorter window than documented, or shared across a whole organisation. Burst traffic can breach a per-second limit while staying under the per-minute one.

What does a 422 mean versus a plain 400?

422 signals that the request was syntactically valid JSON or form data but semantically wrong — a field with an out-of-range value, a date in the past where a future one is required. A 400 usually means the body itself could not even be parsed. If your API distinguishes the two, checking which one came back tells you whether to look at your serialization code or your business-rule validation first.

Which related tools should you try next?

Written and reviewed by Jim Vernon, Editor, AI Intelligence International. Published by AI Answer Engine, a service of AI Intelligence International, and checked against our editorial standards.