Skip to main content

Handling Errors

If there is an error in your request, you will receive a response with an error field explaining the issue. Ensure your input adheres to the specified schema.

Example Error Response

When calling an agent that summarizes musical artist info with an invalid artist name, you might receive a response like this:
{
  "error": {
    "reason": "LLM_GENERATED_ERROR",
    "errors": [
      "I could not find any information about an artist or band named 'The Mysterious Sound.' Please check the spelling or provide a different artist name."
    ]
  },
}
The entire response will look like this:
{
  "id": "ddd36570-bbdc-4ad1-a8d1-58a9de7c8979",
  "createdBy": "d8960ff9-b872-4701-ab71-b28325c443f7",
  "createdAt": "2025-05-01T19:56:26.070Z",
  "updatedAt": "2025-05-01T19:56:33.180Z",
  "orgId": "00f04988-958d-442c-9142-bd14399d87b3",
  "documentId": "0b9ff0a0-aafb-45f5-9b63-67985320fe79",
  "documentVersionId": "4df0fc7f-0218-4318-ae1e-2fe15e97223f",
  "promptExecutionId": "7a2b1ee9-6f3d-4f65-9334-3569dded26ed",
  "status": "ERROR",
  "input": {
    "artistName": "The Mysterious Sound"
  },
  "output": null,
  "error": {
    "reason": "LLM_GENERATED_ERROR",
    "errors": [
      "I could not find any information about an artist or band named 'The Mysterious Sound.' Please check the spelling or provide a different artist name."
    ]
  },
  "source": "API",
  "tenantId": null,
  "executionDurationMs": 7109.575
}