Grokking Modern API Design Interview
Vote

0% completed

Status Codes and Error Design

A server refuses a request and returns:

HTTP/1.1 400 Bad Request
{ "error": "Invalid request" }

The response says something went wrong. It does not tell a program what happened, a developer what to fix, or either one whether retrying will help.

A failure needs two layers. The HTTP status tells software what kind of outcome this is. The error body names the exact condition and the caller's next move. This lesson designs both.

1. Status Codes Tell Programs What Kind of Outcome Occurred

An interviewer does not want a memorized catalog of every HTTP status

.....

.....

.....

Like the course? Get enrolled and start learning!