Grokking Modern API Design Interview
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.
An error response has two parts. The HTTP status describes the broad outcome. The error body identifies the specific condition and helps the client choose its next action.
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!
Reading Progress
0%