Error Handling
The ZenFlow API uses standard HTTP status codes and returns detailed error information in JSON format.Error Response Format
All errors follow this structure:HTTP Status Codes
Common Error Codes
Authentication Errors
Authorization Errors
Validation Errors
Resource Errors
Rate Limiting
Handling Errors
JavaScript/TypeScript
Python
Best Practices
Check success Field
Always check the
success field in responsesLog Error Codes
Log error codes for debugging and monitoring
Handle Retries
Implement retry logic for transient errors
User Messages
Show user-friendly messages for validation errors
Retry Strategy
Retry these errors with exponential backoff:429Rate limit exceeded500Internal server error503Service unavailable- Network timeouts
400Bad request (fix the request first)401Unauthorized (fix authentication)403Forbidden (check permissions)404Not found (resource doesn’t exist)
Getting Help
If you encounter persistent errors:- Check the error code and message
- Review the API documentation
- Check service status
- Contact [email protected] with:
- Error code and message
- Request details (endpoint, method)
- Timestamp of the error

