Error responses from the Maple API have the following fields

  • error_message The description for the error
  • error_type The type of error such as auth_error, validation_error etc. Please see a full list of error types below.
  • error_code The error code for the type of issue that can be referenced for nuanced error handling
  • error_status The same as the HTTP status code for the response

The error response can have additional fields that have more details about the error. For example, the validation_errors field is populated for errors with type validation_error

{
    "error_message": "Request body does not contain all required information",
    "error_type": "validation_error",
    "error_status": 400,
    "validation_errors": [
        {
            "field": "config_items",
            "message": "config_items is required"
        }
    ]
}

Here’s more details on the different status codes and error types with the Maple API

Status CodesError TypeDescription
400request_error or validation_errorBad request parameters or validation failure
401auth_errorAuth token failure or unauthorized access to a resource
403auth_errorForbidden access to a resource
404request_errorResource not found
409idempotency_errorConflicting requests with the same idempotency key
429request_errorRate limiting has occurred
500request_errorInternal server error within Maple