Complete list of error codes for the SnackPrompt AI Engine API.
The API returns errors in the following format:
{
"detail": "Message describing the error"
}
Request accepted for processing
Validation error or invalid parameters
No permission to access resource
Service temporarily unavailable
400 - tenant_id Required
Response:
Cause: The tenant_id was not included in the filters object.
Solution: Add tenant_id to filters:
400 - Query Required
Response:
Cause: The query field was not provided in a search or chat request.
Solution: Add the query field:
400 - Invalid Filters
Response:
Cause: An unknown filter was provided.
Solution: Use only valid filters. See Filter Reference.
404 - Elemental Not Found
Response:
Cause: The provided elemental_id doesn't exist or hasn't been ingested.
Solution:
Check if the ID is correct
Check if the elemental was ingested
Wait for ingestion to complete (asynchronous process)
422 - Invalid Data
Response:
Cause: A field was provided with the wrong type.
Solution: Check data types. See Data Models.
429 - Rate Limit
Response:
Cause: Too many requests in a short period.
Solution:
Implement retry with exponential backoff
Consider upgrading your plan for more requests
Response headers:
500 - Internal Error
Response:
Cause: Unexpected server error.
Solution:
Try again in a few seconds
If it persists, contact support
Include the trace_id if available
503 - Service Unavailable
Response:
Cause: The service or a dependency is unavailable.
Solution:
Check status at /health/detailed
Contact support if it persists
Streaming Errors
Error During Streaming
During streaming chat, errors are sent as SSE events:
Solution: Handle the error event in your client:
Recommended Error Handling
JavaScript/TypeScript
Retry with Exponential Backoff
For 429 and 5xx errors, implement retry with backoff: