Error Response Format
All workflow API errors follow a consistent JSON format:Authentication & Authorization Errors
HTTP 401 - Unauthorized
Missing API Key- Cause: No Authorization header provided or invalid API key format
- Resolution: Include a valid API key in the Authorization header using HTTP Basic Authentication
- Cause: API key is invalid or has been revoked
- Resolution: Verify your API key is correct and active in your Decisional account settings
Validation Errors
HTTP 400 - Bad Request
Invalid Knowledge Engine ID- Cause: The knowledge engine ID format is invalid or doesn’t match expected pattern
- Resolution: Ensure the knowledge engine ID follows the format
ke_[alphanumeric]
and exists in your account
- Cause: Required fields like
name
,query
,type
, orknowledge_engine_id
are missing - Resolution: Include all required fields in your request body
- Cause: The specified model name is not supported by the platform
- Resolution: Use a supported model name or omit the field to use the default model
- Cause: The specified model exists but is not enabled for your account
- Resolution: Contact support to enable the model or use a different enabled model
- Cause: Request body contains malformed JSON
- Resolution: Validate your JSON syntax and ensure proper formatting
Knowledge Engine State Errors
HTTP 400 - Bad Request
Knowledge Engine Not Ready- Cause: Knowledge engine is still processing uploaded documents and not ready for queries
- Resolution: Wait for the knowledge engine status to become “ready” before creating workflows
- Check Status: Use the GET
/api/v1/knowledge-engines/{id}
endpoint to monitor status
- Cause: Knowledge engine exists but has no uploaded documents or all data sources have been deleted
- Resolution: Upload at least one document to the knowledge engine before creating workflows
- Cause: Knowledge engine with the specified ID doesn’t exist or you don’t have access to it
- Resolution: Verify the knowledge engine ID and ensure you have proper access permissions
Processing Errors
HTTP 500 - Internal Server Error
RAG Service Failure- Cause: Internal AI processing service is unavailable or experiencing issues
- Resolution: Retry the request after a few moments. If the issue persists, contact support
- Cause: Database connectivity issues during workflow creation
- Resolution: Retry the request. If the issue persists, contact support
- Cause: Vector database service is temporarily unavailable
- Resolution: Retry the request after a few moments
Streaming Query Errors
The/api/v1/knowledge-engines/{id}/query
endpoint uses Server-Sent Events and can return errors during streaming:
Connection Errors
- Cause: Client disconnects before query completion
- Resolution: Ensure stable network connection and implement proper reconnection logic
Error Handling Best Practices
1. Implement Retry Logic
For transient errors (5xx status codes), implement exponential backoff retry logic:2. Validate Knowledge Engine Status
Always check knowledge engine status before creating workflows:3. Handle Streaming Errors
For the query endpoint, implement proper error handling for Server-Sent Events:Common Resolution Steps
Check Knowledge Engine Status
- Use GET
/api/v1/knowledge-engines/{id}
to check status - Ensure status is “ready” before creating workflows
- Verify
data_source_count > 0
Verify API Authentication
- Check API key format: should be
dcl-[unique-identifier]
- Ensure proper Base64 encoding in Authorization header
- Verify API key is active in your account settings
Monitor Rate Limits
While not explicitly documented in error responses, implement reasonable request spacing to avoid potential rate limiting.Contact Support
For persistent 5xx errors or unexpected behavior, contact support with:- Request ID (if available in response headers)
- Timestamp of the error
- Complete error message
- Steps to reproduce the issue