2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted). Codes in the 5xx range indicate an error with Anagram’s servers (these are rare).
There are 2 possible error responses:
- Validation error with
Errorobject, - General error with the string field
detail.
General error (string field “detail”)
The error is related to the request itself. The fielddetail contains a human-readable error message.
Example:
Validation error (error object in field “errors”)
Errors related to the request body object itself are validation errors with a status code400 BAD_REQUEST.
Validation errors return a response object with a field errors, organized in a structure matching the request object (similar to GraphQL), containing error messages related to specific fields. For errors related to specific array elements, array indices are used as object keys.
Examples:
One error in the field quantity of the first service object in the services array field:
last_name of object primary_member: