Repaso
EspaƱol
Backend & APIsCoreAPI-34

What do HTTP status codes starting with 2, 4 and 5 mean?

Options

  1. 2xx is an error, 4xx is success, 5xx is a redirect
  2. 2xx is success, 4xx is a client error, 5xx is a server error (Correct option)
  3. All three groups mean that the request was a success
  4. 2xx is a redirect, 4xx is success, 5xx is a client error

Answer

2xx success, 4xx client error (your request is wrong), 5xx server error (the server failed)

Why

The first digit tells the category:

  • 2xx: success (200 OK, 201 Created, 204 No Content).
  • 3xx: redirect (301, 302, 304).
  • 4xx: the client did something wrong (400 bad data, 401 not logged in, 403 forbidden, 404 not found).
  • 5xx: the server failed (500 bug, 502/503 server down or overloaded).

Remember

2 = OK, 4 = your fault, 5 = server's fault.

Key terms

Practice this question in Repaso