Reading a 500 from someone else's API: what you can and cannot do
A 5xx is the provider's bug, not yours. Here is how to confirm that, what to do while it lasts, and how to keep your own product usable when a dependency fails.
7 min read
Something is broken right now. These are the failures developers actually hit, with the real cause and the fix, not a restatement of the error message.
10 articles
A 5xx is the provider's bug, not yours. Here is how to confirm that, what to do while it lasts, and how to keep your own product usable when a dependency fails.
7 min read
fetch has no default timeout, so a hung request waits forever. Here is how to set one properly, and which failures are safe to retry without duplicating work.
7 min read
"Unexpected token < in JSON at position 0" means you parsed an error page as data. Here is how to find what the server actually sent, and why it sent it.
7 min read
Your page is secure, the API is not, and the browser refuses to connect them. Why there is no client-side fix, and what to do when the API has no HTTPS endpoint.
6 min read
Why the browser sends an OPTIONS request you never wrote, what turns a simple request into a preflighted one, and how to stop doubling your request count.
6 min read
TypeError: Failed to fetch tells you almost nothing, because the browser deliberately withholds the detail. Here is how to work out which of the seven causes you actually have.
7 min read
The key you have not touched in weeks started returning 401. Here are the causes, ordered by how often they turn out to be the real one, and how to confirm each in under a minute.
6 min read
A 401 means the API does not know who you are. A 403 means it knows and is refusing anyway. Telling them apart points you at completely different fixes.
7 min read
A 429 means you are sending faster than the API allows. Here is how to read Retry-After, implement backoff that does not stampede, and stop hitting the limit in the first place.
6 min read
Your fetch works in curl but fails in the browser. Here is what the CORS error actually means, the four fixes that work, and the two pieces of advice that will waste your afternoon.
6 min read