Error Responses

Understanding API error responses and status codes.

When an API request fails, the response body contains an error object with details about what went wrong.

Error Response Shape

{
  "error": {
    "status": 400,
    "name": "BadRequestError",
    "message": "A description of what went wrong.",
    "data": {}
  }
}
FieldTypeDescription
statusNumberThe HTTP status code.
nameStringThe error class name.
messageStringA human-readable description of the error.
dataObjectAdditional context, when available.

Status Codes

StatusNameDescription
400Bad RequestThe request is malformed or contains invalid parameters.
401UnauthorizedMissing or invalid API key. See Authentication.
404Not FoundThe requested Advice Set or resource does not exist.
500Internal Server ErrorAn unexpected error occurred on the server.

Incomplete Advice

In some cases, the API returns a 200 status with advice in an incomplete state. This occurs when the Rules Engine encounters an evaluation error for a specific rule, but other rules in the Advice Set evaluate successfully.

An incomplete advice item will have a type of EvaluatorError rather than ADVICE:

{
  "data": {
    "advice": [
      {
        "type": "ADVICE",
        "headline": "Your contribution limit is $7,000."
      },
      {
        "type": "EvaluatorError",
        "headline": null,
        "message": "An error occurred evaluating this rule."
      }
    ]
  }
}

Check the type field on each advice item to identify and handle these cases in your integration.