Skip to content

Error Codes

HTTP error codes and error response format used by the Tholos API.

The Tholos API uses standard HTTP status codes and returns errors in a consistent JSON format.

All error responses follow this structure:

{
"detail": "A human-readable description of the error"
}

Validation errors (422) use a different format with field-level details:

{
"errors": [
{
"field": "body -> amount",
"message": "value is not a valid integer"
},
{
"field": "body -> chain",
"message": "Input should be 'ethereum', 'polygon', ..."
}
]
}
CodeMeaningUsage
200 OKRequest succeededGET requests, most POST responses with a body
201 CreatedResource createdPOST requests that create a new resource
204 No ContentSuccess with no bodyPUT, PATCH, DELETE operations
CodeMeaningCommon causes
400 Bad RequestInvalid requestMissing required fields, invalid parameter values, business logic violations (e.g., insufficient balance)
401 UnauthorizedAuthentication failedMissing or invalid token, expired PAT, disabled PAT
403 ForbiddenInsufficient permissionsYour role does not allow this operation, or you are not a member of the target vault/organization
404 Not FoundResource not foundThe requested vault, transaction, organization, or other resource does not exist, or you do not have access to it
409 ConflictResource conflictAttempting to create a duplicate resource, or a concurrent edit conflict
422 Unprocessable EntityValidation failedRequest body does not match the expected schema — see the errors array for field-level details
429 Too Many RequestsRate limit exceededYou have exceeded the endpoint’s rate limit — back off and retry
CodeMeaningAction
500 Internal Server ErrorUnexpected server errorRetry with exponential backoff. If persistent, contact support.
// Missing or invalid token
// Status: 401
{
"detail": "Not authenticated"
}
// Expired PAT
// Status: 401
{
"detail": "Token has expired"
}
// Insufficient vault role
// Status: 403
{
"detail": "User does not have the required vault role"
}
// Not a member of the organization
// Status: 403
{
"detail": "User is not a member of this organization"
}
// Trying to approve your own transaction
// Status: 400
{
"detail": "Cannot approve your own transaction"
}
// Policy violation
// Status: 400
{
"detail": "Transaction exceeds daily spending limit"
}
// Vault not active
// Status: 400
{
"detail": "Vault is not in an active state"
}
  1. Always check the status code — don’t assume success
  2. Parse the detail field for human-readable error messages
  3. Handle 422 errors by iterating over the errors array for field-level feedback
  4. Implement retry logic with exponential backoff for 429 and 500 errors
  5. Log error responses to help debug integration issues