Overview
The Voyant API uses standard HTTP status codes to indicate success or failure of requests. Error responses include a JSON body with details about what went wrong.Error response format
All errors return a JSON object with anerror field:
HTTP status codes
2xx Success
4xx Client errors
5xx Server errors
Common errors
400 Bad Request
Invalid request format, missing required fields, or malformed JSON.- Malformed JSON in request body
- Missing required fields
- Invalid parameter types
- Invalid UUID format
- Validate JSON before sending
- Check required fields in documentation
- Ensure correct data types
- Use proper UUID v4 format
401 Unauthorized
Missing or invalid Authorization token.- Missing
Authorization: Bearerheader - Invalid API key
- Revoked API key
- Extra spaces in API key
- Verify Authorization header is included in request
- Check for typos or extra characters
- Generate new API key if needed
- Ensure key hasn’t been revoked
404 Not Found
Requested resource doesn’t exist or you don’t have access.- Invalid resource ID
- Resource deleted
- No access to resource (wrong workspace)
- Typo in endpoint URL
- Verify resource ID is correct
- Check resource still exists
- Confirm resource belongs to your workspace
- Review endpoint URL for typos
429 Rate Limit Exceeded
Too many requests in a short time period.- Exceeding 3,000 requests per minute
- Surpassing the 30 requests per second burst window
- Missing rate limit handling
- Implement exponential backoff
- Use
retry_aftervalue for delays - Cache responses when possible
- Coordinate with support ahead of high-volume events
500 Internal Server Error
Unexpected server error.- Temporary service issue
- Database connection problem
- Upstream service failure
- Retry request with exponential backoff
- Contact support if persistent
- Include
X-Request-IDwhen reporting
Error handling best practices
1. Check status codes
Always check the HTTP status code before parsing the response:2. Implement retry logic
Use exponential backoff for retrying failed requests:3. Log request IDs
Always log theX-Request-ID header for debugging:
4. Handle rate limits
Respect rate limit headers to avoid throttling:5. Validate inputs
Validate data before sending to avoid 400 errors:Error handling patterns
Graceful degradation
User-friendly messages
Map technical errors to user-friendly messages:Circuit breaker pattern
Prevent cascading failures with circuit breaker:Debugging errors
Enable verbose logging
Add detailed logging for development:Check API status
Before debugging, verify API status:Test authentication
Isolate authentication issues:Getting help
If you encounter persistent errors:1
Review documentation
Verify your implementation matches the API reference
2
Collect information
- Request ID (
X-Request-ID) from response headers - Endpoint, method, and sanitized request payload
- Response status code and body
- Workspace ID and timestamp of the failure
3
Contact support
Email help@voyantcloud.com with the details above or open a ticket from the dashboard.