Guides
Error Handling
Error response format, status codes, and retry strategies
Error Handling
The API uses consistent error responses across all endpoints with structured error objects and trace IDs.
Error Response Format
{
"success": false,
"error": {
"message": "Invalid credentials",
"statusCode": 401,
"details": {}
},
"meta": {
"requestId": "req_abc123"
}
}Every error response includes a requestId for debugging and support.
Status Codes
| Code | Meaning | Action |
|---|---|---|
400 | Bad Request | Check request body against the schema |
401 | Unauthorized | Refresh or re-authenticate credentials |
404 | Not Found | Verify the integration ID exists |
422 | Validation Error | Check metric/dimension IDs are valid |
429 | Rate Limited | Wait and retry with backoff |
500 | Internal Error | Retry; report if persistent |
502 | Upstream Error | The integration's API is down; retry later |
Validation Errors
When request validation fails, the details field contains specific field errors:
{
"success": false,
"error": {
"message": "Validation error",
"statusCode": 400,
"details": {
"fieldErrors": {
"metrics": ["Required"]
},
"formErrors": []
}
}
}Retry Strategy
For transient errors (429, 500, 502), implement exponential backoff:
- Wait 1 second, then retry
- Wait 2 seconds, then retry
- Wait 4 seconds, then retry
- Give up after 3 retries
The API itself handles per-integration rate limiting with adaptive backoff, but your client should also handle rate limits at the API level.
Integration-Specific Errors
When an upstream API returns an error, the API wraps it in a consistent format:
{
"success": false,
"error": {
"message": "Upstream API error: Rate limit exceeded",
"statusCode": 502
}
}Testing Connections
Always test credentials before running queries to catch auth issues early:
curl -X POST https://api.oviond.com/v1/integrations/{id}/test \
-H "Content-Type: application/json" \
-d '{
"credentials": { "apiKey": "YOUR_API_KEY" }
}'A 200 response with status: 200 means the credentials are valid.