Tech
401 vs 403 vs 404: The Status Code Mistakes That Break APIs
Originally published at ipcalcplus.com .
Every API review I've ever done contains at least one of these bugs: a login failure that returns 500, a rate limit that returns 400, a "resource not found" that returns 403 for security reasons and confuses every client developer for the next two years.
Status codes are the API's contract with its clients. Break the contract and your consumers write defensive code around your bugs β code that then breaks when you fix the bug. This is a guide to t...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to