What are Different Type of HTTP Errors and Status Code?


HTTP errors, also known as HTTP status codes, are standard response codes given by web servers on the internet. They indicate the success, failure, or other status of HTTP requests made by a client (e.g., a web browser) to a server. Here are some common HTTP status codes categorized by their respective classes.

1. Informational (1xx)

  • 100: Continue: Indicates that the initial part of the request was received, and the client can proceed with sending the remainder.
  • 101: Switching Protocols: The server is indicating a change in the protocol applied to the communication.

2. Success (2xx)

  • 200: OK: Request succeeded. The server successfully processed the request.
  • 201: Created: The request has been fulfilled and resulted in the creation of a new resource.
  • 204: No Content: The server has successfully fulfilled the request, but there is no content to send in the response.

3. Redirection (3xx)

  • 300: Multiple Choices: Indicates multiple options for the resource that the client may follow.
  • 301: Moved Permanently: The resource requested has been permanently moved to a new URL.
  • 304: Not Modified: Used for caching purposes. Indicates that the resource has not been modified since the last request.

4. Client Error (4xx)

  • 400: Bad Request: The server cannot process the request due to a client error.
  • 401: Unauthorized: The request requires authentication or the user lacks proper authentication credentials.
  • 404: Not Found: The requested resource could not be found on the server.

5. Server Error (5xx)

  • 500: Internal Server Error: A generic error message indicating an unexpected condition encountered by the server.
  • 503: Service Unavailable: The server is currently unable to handle the request due to temporary overloading or maintenance.

Each status code category has specific meanings, helping in understanding the outcome of a request-response cycle between a client and a server. These codes are essential for diagnosing issues and communicating the status of web requests between systems on the internet.