Error Response Format
All Vouch API errors follow a consistent format:HTTP Status Codes
| Status | Meaning | When It Occurs |
|---|---|---|
| 400 | Bad Request | Invalid request parameters |
| 401 | Unauthorized | Invalid or missing API key |
| 403 | Forbidden | API key lacks permission |
| 402 | Payment Required | Quota exceeded |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server error |
Error Codes Reference
Authentication Errors (401)
- Verify your API key is correct
- Check you’re using the right environment (test vs live)
- Regenerate key if compromised
Request Errors (400)
Permission Errors (403)
Quota Errors (402)
- Upgrade your plan
- Wait for quota reset (1st of month)
- Contact support for quota increase
Rate Limit Errors (429)
- Implement exponential backoff
- Respect
retryAftervalue (seconds) - Use server keys for higher limits (5,000/hr vs 1,000/hr)
Server Errors (500)
- Retry with exponential backoff
- Contact support if persistent
Handling Errors
Recommended Error Handling Pattern
- JavaScript
- Python
- Go
Retry Logic
Implement exponential backoff for rate limits and server errors:Monitoring Errors
Response Headers
Check these headers to monitor quota and rate limits:Logging Recommendations
Log errors with context for debugging:Best Practices
Always check success field
Always check success field
Implement retry logic for transient errors
Implement retry logic for transient errors
Retry on:
RATE_LIMITED(with exponential backoff)INTERNAL_ERROR(max 3 retries)
UNAUTHORIZED(fix API key)QUOTA_EXCEEDED(upgrade plan)INVALID_EMAIL(invalid input)
Show user-friendly messages
Show user-friendly messages
Don’t expose internal error codes to users:
Monitor quota proactively
Monitor quota proactively
Set up alerts when quota reaches 80%: