Чтобы не искать спецификацию каждый раз, мы собрали по классам коды состояния, которые чаще всего встречаются на практике. Нажатие на каждый код в списке ниже открывает подробную страницу с его значением, ситуацией возникновения, причинами и способами решения.
Быстрые ориентиры: 2xx — успех, 3xx — перемещение (перенаправление), 4xx — проблема запроса (клиента), 5xx — проблема сервера. Если вы видите 4xx, сначала проверьте URL запроса, заголовки и аутентификацию; если видите 5xx, сначала проверьте логи сервера и состояние бэкенда.
Часто используемые коды состояния с одного взгляда
2xxУспех (Success)
3xxПеренаправление (Redirection)
4xxОшибка клиента (Client Error)
400Bad Request ЧастыйThe server cannot process the request due to a client error such as malformed syntax.401Unauthorized ЧастыйAuthentication is required and has failed or not been provided (i.e. unauthenticated).403Forbidden ЧастыйThe server understood the request but refuses to authorize it. Re-authenticating will not help.404Not Found ЧастыйThe server cannot find the requested resource. The most well-known status code.405Method Not Allowed ЧастыйThe HTTP method is known but not supported for the target resource.409Conflict ЧастыйThe request conflicts with the current state of the resource.422Unprocessable Content ЧастыйThe request is well-formed but has semantic errors (e.g. validation failed).429Too Many Requests ЧастыйThe client has sent too many requests in a given time (rate limiting).
5xxОшибка сервера (Server Error)
500Internal Server Error ЧастыйA generic catch-all: the server hit an unexpected condition and could not complete the request.502Bad Gateway ЧастыйA gateway or proxy received an invalid response from an upstream server.503Service Unavailable ЧастыйThe server is temporarily unable to handle the request due to overload or maintenance.504Gateway Timeout ЧастыйA gateway or proxy did not get a timely response from an upstream server.