error field containing a human-readable message. The HTTP status code tells you the category of the problem. There are no nested error objects or machine-readable error codes beyond the status code itself.
Error Response Shape
Every error response looks like this:Content-Type header is always application/json, even for error responses.
HTTP Status Codes
Example Error Responses
400 — missing required field:Handling Errors in Code
Checkres.ok before reading the response body. When res.ok is false, parse the JSON and surface the error string to your users or logs.