Errors
What each status code means and how to fix it.
Errors use standard HTTP status codes and a JSON body with at least statusCode and message.
{
"statusCode": 404,
"message": "Process log 9b1f… not found",
"error": "Not Found"
}message is written for people. Branch your code on the status code, and on error or code where an error type documents one, never on the message text.
Status codes
| Status | Meaning | What to do |
|---|---|---|
400 | The request is invalid. | Fix the fields listed in message and send it again. |
401 | The API key is missing, wrong, expired or deleted. | Check the x-api-key header. |
402 | Not enough credits to start the job. | Top up, or wait for your next monthly grant. See Credits. |
403 | The key isn't allowed to do this. | See the variants below. |
404 | The resource doesn't exist in your organization. | Check the ID. A key only sees its own organization. |
409 | The resource isn't in the right state yet, for example a result requested while the job is still running. | Wait and try again. |
429 | Too many requests for this key. | Wait for Retry-After seconds. See Rate limits. |
5xx | Something failed on our side. | Retry with backoff. If it keeps happening, contact support with the X-Request-Id. |
Validation errors
When fields fail validation, message is a list with one entry per problem. Nested fields use dotted paths.
{
"statusCode": 400,
"message": [
"targetLanguages: targetLanguages must be an array",
"files.0.fileKey: fileKey must be a string"
],
"error": "Bad Request"
}Permission errors
When the key's role lacks a permission, the response says which one.
{
"statusCode": 403,
"error": "PermissionDenied",
"message": "You do not have the required permissions in this organization. Required: credits:read",
"required": ["credits:read"]
}Other 403 messages you may see:
- This API key belongs to a different organization. You sent an
organizationIdheader for another organization. Remove the header. - You are not a member of this organization. The person who created the key has left the organization. Create a new key.
- Your organization does not have access to this feature. The product isn't enabled for your organization. Contact Acclaro to enable it.
- This feature is currently turned off. An admin has turned this product off in your organization's settings.
Credit errors
{
"statusCode": 402,
"error": "InsufficientCredits",
"message": "You don't have enough credits to start this. It needs 120; you have 80.",
"required": 120,
"available": 80,
"owed": 0
}Retrying safely
Retry 429 and 5xx responses with exponential backoff and jitter. Don't retry other 4xx responses without changing the request: the same request will fail the same way.
Some endpoints accept an Idempotency-Key header, and the reference marks which ones. Send a unique value, such as a UUID, with the request. If you retry with the same key and the same body within 24 hours, you get the first response back and the work isn't done twice.
Where an endpoint doesn't take an Idempotency-Key and a request that starts a job times out, check the job list before sending it again. Otherwise you may start the job twice and pay for both.