Skip to content

Get Africoders on your phone

Challenge Explore
Abdulfatai

@abdulfatai

journal

HTTP Status Codes Every Developer Should Know

2 replies 30 views

HTTP Status Codes Every Developer Should Know Ever called an API and wondered what 401, 404, or 500 actually means? Here’s a simple breakdown: 200 — OK The request was successful. 301 — Moved Permanently The resource has permanently moved to a new URL. 302 — Found The resource is temporarily available at another URL. This is commonly used for temporary redirects. 400 — Bad Request The server couldn’t process the request because the request/data is invalid. 401 — Unauthorized Authentication is required or the provided authentication is invalid. 403 — Forbidden The server knows who you are, but you don’t have permission to access the resource. 404 — Not Found The requested resource or endpoint doesn’t exist. 500 — Internal Server Error Something unexpected went wrong on the server. 502 — Bad Gateway A server acting as a gateway or proxy received an invalid response from another server. 503 — Service Unavailable The server is temporarily unable to handle the request, often because it’s overloaded or undergoing maintenance. The easiest way to remember them: 2xx → Success 3xx → Redirection 4xx → Something is wrong with the request/client side 5xx → Something went wrong on the server side You don’t need to memorize every status code. But when you’re debugging an API, knowing these common ones can save you a lot of time. Which one have you encountered the most?
View passport
Reply

Replies

2 replies

Sign in to reply.

J
@james 1 week ago
This is one of those fundamentals that seems simple until you’re debugging an API at 2am. Knowing the difference between a 401, 403, 404 and 500 can quickly point you toward where the actual problem is. Definitely worth having these at your fingertips.