HTTP Status Codes
Errors at the transport or authentication layer return a non-2xx HTTP status code:HTTP Error Response
Non-2xx responses return a simple JSON object:Business Logic Errors (HTTP 200)
Validation and business rule failures return HTTP 200 with aresult of "FAILURE" in the response body. Always check the result field: a 200 does not guarantee success.
Response Schema
string
"SUCCESS" or "FAILURE"number | null
The ID of the created or updated resource, if applicable
object | null
Additional data returned by the operation
object | null
Present when
result is "FAILURE" (see below)Error Object Schema
object
Map of field name to error. Each value has
type and errorMessage.array
List of errors not tied to a specific field. Each item has
type and errorMessage.Error Types
Example: Field Validation Failure
Example: Global Error
Recommendations
- Always check the
resultfield on 200 responses before treating an operation as successful. - Use
fieldErrorsto surface inline validation messages to users. - Use
globalErrorsfor form-level or operation-level error banners. - Log the full error response for troubleshooting:
typeis machine-readable and suitable for programmatic handling.