Skip to main content
Dolva returns standard HTTP status codes to indicate success or failure. Building robust error handling into your integration ensures that failures degrade gracefully rather than crashing your application.

HTTP Status Codes

Validation Errors (422)

When your request is missing required fields or contains invalid data, Dolva returns a 422 response with a detailed error body:
422 Validation Error
Each item in detail describes one validation failure:
  • loc — where the error occurred (e.g., ["body", "audio"] means the audio field in the request body is the problem)
  • msg — a human-readable description of the error
  • type — a machine-readable error type string
Common 422 causes:
  • The audio field is missing from your multipart/form-data request
  • The file is empty or corrupt
  • The content type is not recognized as audio

Handling Errors in Code

Retrying on Server Errors

For 5xx errors, implement exponential backoff: wait 1s before the first retry, 2s before the second, 4s before the third, and so on. Most transient server errors resolve within a few seconds.
Do NOT retry 401 or 422 errors — these indicate problems with your request that won’t resolve on their own. Fix the underlying issue before retrying.

Checking API Health

Before sending large batches of requests, you can verify that the Dolva API is reachable by calling the health endpoint (no authentication required):
curl
A 200 OK response confirms the API is up. See the Health endpoint reference for details.

Authentication

Troubleshoot 401 errors and token setup.

Health Endpoint

Check API availability before batch operations.