Skip to content
LIVOI
Dashboard

Error handling

The LIVOI API uses a consistent JSON schema for errors, allowing clients to handle status codes, error messages, and detailed causes consistently.

The error response contains:

  • status_code: HTTP status code as a string
  • status_message: HTTP status description, such as Forbidden or Unprocessable Entity
  • errors: a list of error objects

An error object may contain these optional fields:

  • info
  • type
  • context
  • cause

cause can be a single object or a list. Validation errors typically produce a list. Cause entries may contain details, value, location, and code.

{
"status_code": "403",
"status_message": "Forbidden",
"errors": [
{
"info": "Missing permission for agents.read."
}
]
}

HTTP 422 is common for Pydantic field validation and Dynamic Query. The current status phrase is Unprocessable Entity.

{
"status_code": "422",
"status_message": "Unprocessable Entity",
"errors": [
{
"info": "Validation failed.",
"type": "ValidationError",
"cause": [
{
"details": "Input should be greater than or equal to 1",
"value": 0,
"location": ["body", "page", "number"],
"code": "greater_than_equal"
}
]
}
]
}
CodeStatusDescription
200OKStandard response for successful HTTP requests. The resource was retrieved or processed successfully.
201CreatedThe request succeeded and a new resource was created. Typically used for POST requests.
204No ContentThe request succeeded with no content to return. Common for DELETE operations.

Dynamic Query route specifications include 400, 401, 403, 404, 422, and 500.