✅ 2xx Success
• 200 OK: Request succeeded
• 201 Created: New resource created
• 202 Accepted: Request in progress
• 204 No Content: Success, but no content to return
↪️ 3xx Redirection
• 301 Moved Permanently: Resource has new permanent URL
• 302 Found: Resource temporarily at different URL
• 304 Not Modified: Resource unchanged since last request
❌ 4xx Client Errors
• 400 Bad Request: Client-side error (e.g., invalid syntax)
• 401 Unauthorized: Authentication required
• 403 Forbidden: Server refuses to fulfill request
• 404 Not Found: Resource doesn’t exist
• 405 Method Not Allowed: HTTP method not supported
• 408 Request Timeout: Server waited too long for request
🚫 5xx Server Errors
• 500 Internal Server Error: Unexpected server condition
• 501 Not Implemented: Server lacks required functionality
• 502 Bad Gateway: Invalid upstream server response
• 503 Service Unavailable: Server temporarily unavailable
• 504 Gateway Timeout: Upstream server timed out
Understanding these codes is crucial for robust error handling and seamless user experiences.
Gif Credit - Nelson Djalo