Every API response has a status code, and most include a message in the body explaining it. Read both. 4xx codes mean the API rejected your request: 400 (bad data), 401 (missing or wrong key), 403 (not allowed), 404 (wrong address), 429 (too many requests). 5xx codes mean the API's own server failed. No response at all means the API is unreachable, the request was blocked, or it timed out.
What's the problem
Part of your app has stopped loading data or saving changes, and the browser's Network tab or your server logs show failed API requests.
Why it happens
- Authentication: an expired, rotated or missing API key or token (401, 403).
- Bad requests: the data sent doesn't match what the API expects, often after an update on either side (400, 422).
- Wrong address: a changed endpoint, a missing version prefix, or the wrong environment (404).
- Rate limits (429).
- The API's server is failing (500, 502, 503) or slow (504, timeouts).
- Browser-only failures: CORS blocks, or mixed content. See CORS error.
How to fix it
- Open the failing request in Developer Tools → Network (or your server logs) and note the status code and response body.
- For 401 or 403, check the key or token your live app sends, and whether it expired or was revoked.
- For 400 or 422, compare what you send with the API's documentation; the body usually names the bad field.
- For 404, check the exact URL and API version.
- For 429, slow down and respect the
Retry-Afterheader. See API rate limit. - For 5xx, check the API provider's status page, or your own API's logs if it's yours. See API returning 500.
What Preventionlabs checks
One click runs the full report on your domain. For this problem it shows whether your site loads, how fast, and where its redirects go. With Cloudflare connected, it also shows which pages returned server errors (5xx) to visitors, and when; errors thrown by your Workers code; recent deploys and account changes, with their times. It doesn't call your API with your app's own requests or read your logs, so test the failing request directly as well.
Run your free reportYour first report is free, no card needed. Then A$50 a month, up to 10 domains. Read-only: it never changes anything.
Sources
- MDN Web Docs: HTTP response status codesreference
HTTP response status codes indicate whether a specific HTTP request has been successfully completed.
- MDN Web Docs: 401 Unauthorizedreference
The HTTP 401 Unauthorized client error response status code indicates that a request was not successful because it lacks valid authentication credentials for the requested resource.