Server Errors

Server Errors

What are server Errors and How to Fix Them?

  • Sometimes when you are trying to visit a web page, you are met with an HTTP error message. It's a message from the web server that something went wrong. In some cases, it could be a mistake you made, but often it's the site's fault.

  • Each type of error is an HTTP error code dedicated to it. For ex: If you are trying to access a non-existing page on a website, you will be met by the familiar 404 error.

blog1.png

  • The HTTP response status code indicates whether a specific HTTP request has been completed.
  • Responses are grouped into Five classes.
    1. Informational Responses (100 - 199)
    2. Successful responses (200 - 299)
    3. Redirects responses (300 - 399)
    4. Client error responses (400 - 499)
    5. Server error responses (400 - 599)

Note: If you receive a response that is not in this list, it is a non-standard response, possibly custom to the server's software.

1. Informational Responses:

There are four Informational Responses those are Continue, Switching Protocols, Processing, and Early.

blog3.png

  • 100 Continue: The HTTP 100 Continue Informational Response status code is used to inform the client that till now everything is OKAY with the request. If the work is done then the client will ignore it if it’s not done yet then the client will proceed with the other requests. The server needs to send a final response when the request has been completed.

status:

100 continue
  • 101 Switching Protocols: The HTTP 101 Switching Protocol Informational Response status code is used to indicate the protocols that are going to switch for the client request which includes the upgrade request header for the protocols. This status code can be used with the WebSockets.

status:

101 Switching Protocols
  • 102 Processing: The 102 Processing Informational Response status code is used to indicate that the server received the request and working on the request but in response, there is nothing till now.

  • 103 Early Hints: The 103 Early Hints Informational Response status code is used with the link header to allow the User-Agent to reloading the resources when the server is preparing a response. So basically when the server is working on to prepare the response then, the 103 Early Hints forcefully reloading the resources so the server can have a few times on preparing a response.

Status:

103 Early Hints

Click Informational Responses to know more about it.

2. Successful responses

There are ten Successful Responses those are OK, Created, Accepted, Non-Authoritative Information, No Content, Reset Content, Partial Content, Multi-Status, and Already Reported.

blog2.png

  • 200 OK: The HTTP 200 OK response meaning is that the request made by the client has been successful, but the meaning of the success depends on the four types of requests made by the clients. The GET method fetch and transmitted the resources in the message body. The HEAD method is placed in the message body as an entity-header. The POST method describing the result of the action is transmitted in the message body, and the last TRACE method contains the request message as received by the server.
    Status:
200 OK
  • 201 Created: The 201 Created indicates that the request has succeeded and has led to the creation of a resource. It means the origin server MUST create the resource before returning the 201 Created code if that is not possible then it will become 202 Accepted.

status:

201 Created
  • 202 Accepted: The 201 Accepted indicates that the request from the client has been received, but it does not mean the server is working on it. Maybe that time the server is working on other requests, so the client has to wait until the turns of that accepted request come. Accepted means it will definitely proceed.

status:

202 Accepted

3. Redirects responses

  • 300 Multiple Choice: It is a link list. This request can have a maximum of five possible responses. The user can choose one of the links and go to the location. status:
300 Multiple Choice
  • 301 Moved Permanently: The 301 moved permanently means that the requested resource has permanently been moved to a new URL. The new URL is given in the response.
  • Status:
301 Moved Permanently
  • 302 Found: The 302 Found means that the requested resource has been moved temporarily to a new URL. The same URL should be used by visitors in a future request. Status:
302 Found

Click Redirects responses to know more about it.

4. Client error responses

blog4.png

  • 400 Bad Request: This response code occurs when the server could not understand the request because an invalid syntax is used. Status:
400 Bad Request
  • 401 Unauthorized: This response code occurs when the server refuses to respond to the request because the request lacks client authentication to get the resources. Status:
401 Unauthorized
  • 402 Payment Required: The response code 404 is reserved for future use. The aim of creating this response code is for the digital payment system. Status:
402 Payment Required
  • 403 Forbidden: This response code occurs when the client wants to access the content but it does not have the right to access the content as it is unauthorized. Status:
403 Forbidden

Click Client error responses to know more about it.

5. Server error responses

Server error response occurs when the server fails to fulfill the request of the visitor.

blog5.png

  • 500 Internal Server Error: 500 Internal Server Error is a common error message that occurs when the server meets an unexpected situation and it doesn’t know how to handle it. Status:
500 Internal Server Error
  • 501 Not Implemented: 501 Not Implemented occurs when the requested method is not supported by the server. The server either does not perceive the request or it comes up short on the capacity to fulfill the request. GET and HEAD are the only methods that the server support. Status:
501 Not Implemented
  • 502 Bad Gateway: 502 Bad Gateway occurs when the server is working as a gateway and it receives an invalid response from the upstream server. Status:
502 Bad Gateway
  • 503 Service Unavailable: 503 Service Unavailable occurs when the server is unable to handle the requests (the server is temporarily overloading or down). Status:
503 Service Unavailable

Click Server error responses to know more about it.