LESSON 05 / 22·2 min readFoundation

Which HTTP status codes should I know?

Try code in the playground
01 Understand02 Recall03 Prepare

Understand the concept

An HTTP status code describes the outcome of an HTTP request using a standard numeric category. Clients use it to decide whether to use a result, correct a request, authenticate or retry. A response body can add application details, but should not contradict the status code.

Important ideas

  • 200: success; 201: created; 204: success without a response body.

  • 400: bad request; 401: missing/invalid authentication; 403: not allowed; 404: not found.

  • 409: conflict; 429: too many requests; 500: server error; 503: unavailable.

  • Do not return 200 for every failure; clients, monitoring and retry logic then lose useful information.

PAUSE & RECALL

Can you explain it without the notes?

Which HTTP status codes should I know?

Use your own words. Explain an example and one limitation before checking the explanation.

Check your explanation

An HTTP status code describes the outcome of an HTTP request using a standard numeric category. Clients use it to decide whether to use a result, correct a request, authenticate or retry. A response body can add application details, but should not contradict the status code.

CONNECT IT TO YOUR INTERVIEW

Turn this concept into a clear answer.

  • Distinguish 401 from 403 and explain that 5xx retries still need limits and safe request semantics.
Practice this concept
YOUR NEXT STEP

Keep connecting the ideas.

Next lesson: PUT vs PATCH, and what does idempotent mean?

Adapted from 02_NODE_EXPRESS_HTTP.md · “Which HTTP status codes should I know?”. Examples are study fragments; framework behavior can depend on your version.