What are some HTTP errors?

Internet users who have dug a little deeper into the terminology of the Web (at least most of them) know what HTTP is. This data transfer protocol allows users to interact with web resources through a browser. One of the functions of the protocol is the ability to return special codes that give users information about the status of the website or the status of a particular task. This also includes HTTP error codes. Error codes are divided into two types: client errors and server errors. We will talk about these two categories and other useful, and most importantly, frequently encountered codes in this article.

HTTP errors

HTTP client errors

If an error was detected on the client side, the server returns a code from the 4xx class to it. If there are no problems found on the server, but it is still inaccessible to the user, a code is sent to the client explaining the error.

So, client errors under 40x code:

  • 400. Invalid request - an error occurs when the server notices a syntax error in the request from the client. It will occur until the relevant changes are made by the client. All data transfer rules for the protocol used must be observed.
  • 401. No authorization - this error means that the HTTP server requires authentication. At the same time, it is from the server side that all the conditions for performing authentication come. The cause of the error may be an incorrect login or password for authorization.
  • 402. A fee must be paid - the code is not used, but is reserved in the protocol for the future. It was originally conceived as an interface for making a payment to gain access to a specific resource. Since nothing happened, the code 402 was adopted by Apple and Google, from time to time using it in their web services.

Error, HTTP Error

  • 403. Access is closed - an error occurs when the server is functioning correctly, but the user requesting access to it does not have sufficient rights to do this. Often accompanied by an authorization window.
  • 404. Not Found (resource / file not found) - the most common error on the Internet. Typically due to typos when typing a web address. Frequent mention and appearance on the Web turned this code into a joke popular on the Internet.
  • 405. Prohibited method - HTTP data error that must be entered using POST or using the PUT method. In other words, an error occurs when using the GET method when it is not available or is not supported by the server to process certain data.
  • 406. Request cannot be accepted - this code is returned by the server when the requested content is not applicable to Accept headers. Most often occurs when the requested resource does not correspond to the format that can be recognized by the client.
  • 407. Authorization is required on the proxy server side β€” together with the code, the server returns a special field for authorization on the proxy server.
  • 408. Time for request has expired - occurs when the server stops waiting for further requests from the client. You can retry the request at any time, even after the timeout period has elapsed.
  • 409. Conflict - in what situations does this HTTP error occur? Upload a file to a web server where an identical file or a newer version document has already been saved. The version control system of files stored on the server does not allow replacing the file with an earlier version, which causes a conflict under this code.

HTTP Error Codes

Client Errors Code 41x

  • 410. Resource deleted - an error appears if the requested resource was located at the specified address, but was deleted and is no longer available.
  • 412. Preconditions not met - this code is displayed if the conditional header fields are not satisfied (at all).
  • 413. The request size exceeds the permissible norm - an error occurs when the body of the request sent by the client is too large and the server cannot process it.
  • 414. The address is too long - if the server returns this code, then the URL specified in the request is too long and cannot be processed. Also, an error occurs when the client passes data via GET instead of POST.
  • 415. Unsupported file format - an error occurs when the server refuses to work with a specific data format (there can be any reason).
  • 417. Waiting failed - the request header from the client does not meet the requirements of the EXPECT field.
  • 418 I'm a teapot - the code that first appeared in 1998, which became an April Fools' joke and was never seriously involved.

HTTP server error

Client Errors Code 42x

  • 422. Element cannot be processed - theoretically, the server can process the request sent by the client; the file located in the request body is also supported (it can be a table or any other media file), but for some reason a logical error has occurred that limits the server.
  • 423. Access is closed - the used method is blocked on the server side. You must use a different method.
  • 424. Dependency error - this code will be displayed if the operation, the success of which depends on the execution of the current command, was interrupted for one reason or another.
  • 425. Wrong order of elements - the code is displayed if, when requesting several elements from the server, their order (server) was not followed.
  • 426. Update is required - a code informing about the need to update the protocol. Fields for updating should be correctly formatted on the server side.
  • 428. It is necessary to complete the dependent operation β€” using this code, the server notifies the client that it is necessary to use condition headers in the request.
  • 429. Too many requests - an error occurs if the client sends too many requests to the server, which may be the result of a DDoS attack, therefore it is blocked by the server.

HTTP upload error

Other client error codes

  • 431. Exceeding the length of the header - if the length of the header is exceeded, the server can send this code in response, but more often it simply drops the connection.
  • 434. Address unavailable - an error signals the unavailability of the requested address.
  • 449. Retry - the code is returned if the server requires additional information to process the request.
  • 451. Blocked for legal reasons - the server can be blocked if the government sent a request for blocking for various legal reasons.

When working outside the web browser, other errors may occur, for example, a critical error updating the HTTP server, but its reasons must be found out by the owners of the program or application in which the problem occurred.

HTTP data error

HTTP Server Errors

Such codes occur when staged operations fail due to the fault of the server. Such errors are displayed using 5xx codes and a brief explanation of the error.

Server Errors Code 50x

  • 500 Internal Server Error - HTTP server error that is not identifiable. This code indicates any error for which there is no separately designated code value.
  • 501. Not Implemented (the method is not supported) - this code is output by the server when the method used is not supported by it. The problem occurs when working with servers that are not configured to work correctly with standard HTTP commands.
  • 502. Bad Gateway - a problem occurs when a server acting as a gateway receives an erroneous response from the β€œmain” server.
  • 503. Service Unavailable - this code most often appears when technical work is underway on the server or it reboots.
  • 504. Gateway Timeout - an error occurs when a server operating as a gateway does not have time to receive a response from the β€œmain” server.
  • 505. HTTP Version Not Supported (the used protocol version is not supported) - the specified server does not work with the protocol version specified in the request from the client.
  • 507. Insufficiente Storage (out of space) - the problem occurs when there is not enough digital space to process the request. Most often, the problem is temporary.

Critical HTTP Update Error

Server Errors Code 51x

  • 510. Not Extended - an error appears if the server does not have an extension that was requested by the client.
  • 511. Network Authentication Required - a similar response is sent not from the server itself, but from the intermediary, which is the provider of a paid Wi-Fi point.

Information Codes

  • 100. Continue (continued) - this code notifies the client that his initial actions satisfy the requirements of the server, and he can continue to send commands.
  • 101. Switching Protocols - an interactive code that suggests replacing the protocol used with a more suitable one.
  • 102. Processing (during processing) - a code informing that the request has been accepted, but it will take considerable time to process it.

What does the HTTP error mean?

Redirection codes

  • 300. Multiple Choices (selection) - arises if the selected link allows you to go directly to several resources located on the same server. Together with the code, a choice between different options is provided. Moreover, it can be done by both the user and the client, depending on the server settings.
  • 301. Moved Permanently β€” the code is returned when the requested resource or file has been permanently moved and is located at a different address.
  • 302. Found - the code is returned when the requested resource or file was temporarily moved and can be found at another address.
  • 303. See Other (search by other addresses) - this code is returned by the server along with the alternative value of the Location field so that the user on the client side can access the requested resource using the GET method.
  • 304. Not Modified (the file was not changed) - an error occurs if the client requested a specific file, specifying specific attributes of the modification time, but the server did not detect any changes since it was downloaded.
  • 305. Use Proxy (you must use a proxy server) - this code is displayed by the server, when in order to access it, you need to use a proxy server. The address of the latter is indicated in the Location field. Only core servers (not proxies) can use the code.
  • 307. Temporary Redirect - the code occurs when the requested file or resource becomes available at another address. Often there is an automatic redirection.

Source: https://habr.com/ru/post/C47049/


All Articles