Start a conversation

HTTP codes for client errors

When you try to open a site through a web browser, HTTP requests are sent to the hosting server, to which the client receives responses. Sometimes errors occur when uploading a website to hosting or during its development.

To find out about the results of the execution of queries, special codes are used. All codes can be divided into 5 classes:

  • with code 100-199 — informative,
  • with code 200-299 — successful,
  • with code 300-399 — redirects,
  • with code 400-499 — client errors,
  • with code 500-599 — server errors.

In this article, we'll look at the client-side HTTP response codes. That is, such responses arise from an error on the part of a person or a client application that a person uses, based on the client-server interaction model.

Response code
Name Description
400
Bad Request
This response means that the server does not understand the request due to invalid syntax.
401
Unauthorized
Authentication is required to receive the requested response. The status is similar to the 403 status, but in this case, authentication is possible
402
Payment Required
This response code is reserved for future use. The original purpose of creating this code is for use for digital payment systems (currently not used)
403
Forbidden
The client does not have permission to access the content, so the server refuses to give a proper response
404
Not Found
The server cannot find the requested resource
405
Method Not Allowed
The server knows about the requested method, but it has been deactivated and cannot be used. The two required methods, GET and HEAD, should never be deactivated and should not return this error code
406
Not Acceptable
This response is sent when the web server, after performing a server-driven content negotiation, does not find any content that matches the criteria obtained from the "user agent"
407
Proxy Authentication Required
This response code is similar to 401 code, only authentication is required for the proxy server
408
Request Timeout
A response with such a code can come even without a previous request. It means that the server would like to disconnect this unused connection.
409
Conflict
This response is sent when the request conflicts with the current state of the server.
410
Gone
This response is sent when the requested content has been removed from the server.
411
Length Required
The request was denied because the server requires the "Content-Length" header, but it is not specified
412
Precondition Failed
The client has specified in his headers conditions that the server cannot fulfill
413
Request Entity Too Large
The request size exceeds the limit announced by the server. The server can close the connection by returning a "Retry-After" header
414
Request-URI Too Long
The URI requested by the client is too long for the server to process
415
Unsupported Media Type
The media format of the requested data is not supported by the server, therefore the request is rejected
416
Requested Range Not Satisfiable
The range specified by the "Range" request header could not be executed; it may be outside the passed URI
417
Expectation Failed
This response code means that the expectation received from the "Expect" request header could not be fulfilled by the server



Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Oleksii Momot

  2. Posted
  3. Updated

Comments