The communication protocol HTTP defines a list of HTTP codes. These codes consist of three-digit numbers. Most codes correspond to a specific type of error, while a few correspond to a type of success. These codes are sent by the HTTP server to the HTTP client, enabling the client to automatically determine the success of a request or, if unsuccessful, to identify the type of error.
- 400 Bad Request:
- The server cannot or will not process the request due to a client error.
- 401 Unauthorized:
- The request has not been applied because it lacks valid authentication credentials.
- 403 Forbidden:
- The server understood the request, but it refuses to authorize it.
- 404 Not Found:
- The requested resource could not be found on the server.
- 500 Internal Server Error:
- A generic error message indicating that the server encountered an unexpected condition that prevented it from fulfilling the request.
- 503 Service Unavailable:
- The server is not ready to handle the request. Common causes include a server that is down for maintenance or is overloaded.