success flag tells you immediately whether the call succeeded.
Success Envelope
When a request succeeds, the response body containssuccess: true and a data object holding the result payload:
data varies by endpoint and is documented on each individual endpoint reference page.
Error Envelope
When a request fails, the response body containssuccess: false and an error object with a machine-readable code and a human-readable message:
HTTP Status Codes
estudjo uses standard HTTP status codes alongside the JSON envelope. Use thesuccess flag for branching logic, and use the HTTP status code for coarse-grained categorization (for example, in logging or alerting).
Parsing Example
The pattern below covers the full response-handling lifecycle: fetch, parse, branch onsuccess, and switch on error.code for specific recovery logic.
response-handler.js
All error codes, including every possible
error.code value and the conditions that trigger them, are documented on the Error Codes reference page.