data field is populated and error is null. On failure, data is null and error carries both a human-readable message and a stable machine-readable code.
Response envelope
Success response:Always check the HTTP status code first, then use
error.code for programmatic branching and error.message for displaying a human-readable description to users.Handling errors in code
Error codes
VALIDATION_ERROR responses also include a details array of per-field messages to help you pinpoint the offending input field.
