HTTP Status Codes Decoded
Every status code tells a story. Here is what each one is really saying.
2xx — Success
Everything worked. The request succeeded.
A new resource was successfully created (usually after a POST).
The request succeeded but there is nothing to send back.
3xx — Redirection
The resource has a new permanent URL. Browsers auto-redirect.
The resource is temporarily at another URL.
4xx — Client Error
The server couldn't understand the request. Usually malformed syntax.
You need to authenticate first. No token or invalid credentials.
You are authenticated but don't have permission to access this.
The requested resource doesn't exist on the server.
The HTTP method used (e.g. DELETE) isn't supported for this endpoint.
The server timed out waiting for the client to send a request.
You hit the rate limit. Slow down.
5xx — Server Error
Something went wrong on the server. The generic catch-all.
A server acting as a gateway got an invalid response from the upstream server.
The server is temporarily overloaded or down for maintenance.
The upstream server didn't respond in time.
Quick Rule of Thumb
- 2xx — Everything is fine. Move along.
- 3xx — You are being redirected somewhere.
- 4xx — You messed up. Check your request.
- 5xx — The server messed up. Not your fault.