Error Codes
Error Codes
Section titled “Error Codes”The AutoVio API returns a consistent Error object in JSON for error responses. This page summarizes the error schema and where it is used.
Error schema
Section titled “Error schema”Defined in the OpenAPI document (components.schemas.Error):
{ "error": "Resource not found", "details": "The requested project does not exist"}| Field | Type | Description |
|---|---|---|
| error | string | Short error message (e.g. "Resource not found", "Invalid credentials"). |
| details | string | Optional additional details about the error. |
All error responses that reference #/components/schemas/Error use this structure.
Typical HTTP statuses
Section titled “Typical HTTP statuses”From the OpenAPI document and architecture:
| Status | Meaning | Example causes |
|---|---|---|
| 400 | Bad Request | Invalid body, ID mismatch, missing required header. |
| 401 | Unauthorized | Missing or invalid JWT/API token. |
| 404 | Not Found | Project, work, template, asset, or scene not found. |
| 409 | Conflict | Email already exists on register. |
Each endpoint documents which status codes it can return and when it uses the Error schema.
Examples
Section titled “Examples”-
Invalid credentials (login):
- Status:
401 - Body:
{"error": "Invalid credentials","details": "Email or password is incorrect"} - Status:
-
Project not found:
- Status:
404 - Body:
{"error": "Resource not found","details": "The requested project does not exist"} - Status:
Handling errors
Section titled “Handling errors”- Check the HTTP status code to differentiate auth errors, validation errors, and missing resources.
- Use the
errorfield for user-facing messages. - Use the
detailsfield for logs or debugging.