9 min read

Chapter 15: Status codes

Based on an HTTP request from the client, the server returns a response that includes a status code. The current set of status codes is defined by RFC 9110. A status code is represented as a three-digit number in the range of 100 to 599, where the first digit indicates the category. Although the RFC only requires compliance with the category, I strongly recommend using the extended set of status codes to provide more precise details about the outcome of the request.

HTTP status codes can be categorized as follows:

  • 1xx - informational
  • 2xx - success
  • 3xx - dditional action required to complete the request
  • 4xx - client errors
  • 5xx - server errors

The full content is available exclusively to premium subscribers.