Verso API uses standard HTTP status codes and returns detailed error responses following the RFC 7807 Problem Details format. This guide explains how to handle errors effectively.
Error Response Format
All error responses follow the Problem Details specification:
Code
| Field | Description |
|---|---|
type | URI reference identifying the error type |
title | Short human-readable summary |
status | HTTP status code |
detail | Detailed explanation of the error |
instance | URI of the specific request |
traceId | Unique identifier for debugging |
HTTP Status Codes
2xx Success
| Code | Description |
|---|---|
200 OK | Request succeeded, response contains data |
201 Created | Resource created successfully |
204 No Content | Request succeeded, no response body |
4xx Client Errors
| Code | Title | Common Causes |
|---|---|---|
400 | Bad Request | Invalid JSON, missing required fields, validation errors |
401 | Unauthorized | Missing or invalid API key |
403 | Forbidden | Insufficient permissions, tenant mismatch |
404 | Not Found | Resource doesn't exist |
409 | Conflict | Duplicate identifier, state conflict |
422 | Unprocessable Entity | Business logic validation failed |
429 | Too Many Requests | Rate limit exceeded |
5xx Server Errors
| Code | Title | Description |
|---|---|---|
500 | Internal Server Error | Unexpected server error |
502 | Bad Gateway | Upstream service unavailable |
503 | Service Unavailable | Server temporarily unavailable |
504 | Gateway Timeout | Upstream service timeout |
Common Error Scenarios
Validation Errors (400)
Code
How to fix:
- Check required fields in your request body
- Validate data types (strings, numbers, dates)
- Ensure JSON is properly formatted
Authentication Errors (401)
Code
How to fix:
- Verify the
Authorizationheader is present - Check API key is correctly formatted:
Bearer YOUR_API_KEY - Confirm API key is not expired
Permission Errors (403)
Code
How to fix:
- Verify you have access to the requested resource
- Check your API key permissions
- Ensure you're operating within your tenant scope
Not Found (404)
Code
How to fix:
- Verify the resource ID exists
- Check for typos in the endpoint path
- Ensure the resource belongs to your tenant
Conflict (409)
Code
How to fix:
- Use a unique identifier
- Query existing resources before creating
- Update existing resource instead of creating new
Rate Limiting (429)
Code
How to fix:
- Implement exponential backoff
- Respect the
retryAftervalue - Cache responses when possible
Error Handling Best Practices
Implement Retry Logic
Retry with Exponential Backoff
Log Error Details
Always log the traceId for debugging:
Error Logging
Handle Validation Errors
Display Validation Errors
Debugging Tips
Include Trace ID in Support Requests
When contacting support, always include:
- The
traceIdfrom the error response - Timestamp of the request
- The endpoint called
- Request payload (without sensitive data)
Validate Before Sending
Validate your payloads client-side before sending:
Pre-validation
Next Steps
- Authentication - API authentication guide
- Error Codes Reference - Complete error code list
- API Reference - Explore all endpoints
Last modified on