🥐Handling fetch errors

HTTP response status codes

HTTP response status codes are standard response codes that are returned by a web server to a client to indicate the status of a request. These codes help identify the cause of an error or the success of a request. Here are some common HTTP response status codes:

  • 200 OK: This status code indicates that the request was successful and that the requested resource was returned.

  • 301 Moved Permanently: This status code indicates that the requested resource has been permanently moved to a new URL.

  • 400 Bad Request: This status code indicates that the request was invalid or could not be understood by the server.

  • 401 Unauthorized: This status code indicates that the request requires authentication.

  • 403 Forbidden: This status code indicates that the server refuses to fulfill the request.

  • 404 Not Found: This status code indicates that the requested resource could not be found on the server.

  • 500 Internal Server Error: This status code indicates that an error occurred on the server while processing the request.

HTTP response status codes are three-digit codes, with the first digit indicating the general category of the response. For example, status codes in the 2xx range indicate success, while codes in the 4xx range indicate client errors and codes in the 5xx range indicate server errors.

Last updated