Getting Started
Errors
Triverse uses standard HTTP response codes to indicate the success or failure of an API request. In general:
- Codes in the
2xxrange indicate success. - Codes in the
4xxrange indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.). - Codes in the
5xxrange indicate an error with Triverse's servers.
Error Response Structure
When an error occurs, the response body contains a standard error object:
{
"code": 2004,
"message": "The file type is unsupported.",
"suggestion": "The provided file type 'image/gif' is not supported. Please use one of: image/jpeg, image/png, image/webp."
}Error Code Reference
The following table lists the internal error codes you might encounter:
| Code | HTTP Status | Description |
|---|---|---|
1004 | 400 | Invalid Parameters: The request parameters are invalid (e.g., file too large, URL inaccessible). |
1005 | 404 | Resource Not Found: The requested resource does not exist or you lack permission. |
1006 | 404 | Task Not Found: The specified task does not exist or belongs to another user. |
2000 | 429 | Rate Limit Exceeded: Upload frequency limit reached or task queue is full. |
2002 | 400 | Unsupported Task: The requested task type is not supported. |
2004 | 400 | Unsupported File: The file format is not supported for this operation. |
2005 | 409 | Conflict: The task is not in a state that allows this operation. |
2008 | 400 | Content Violation: The content failed the safety audit. |
2010 | 403 | Insufficient Credits: Your API credit balance is too low for this task. |
4042 | 404 | No Assets: The task succeeded but produced no downloadable assets. |
5003 | 503 | Service Unavailable: A required backend service (Storage, Prefect, or Audit) is down. |
5004 | 500 | Invalid Flow: The internal flow name is invalid. |
5005 | 500 | Persistence Error: Failed to recover or track the task state. |
Handling Errors
We recommend implementing robust error handling in your integration:
- Check HTTP Status: Always check the HTTP status code first.
- Log Internal Codes: Log the
codefield for debugging and support purposes. - User Feedback: Use the
messageandsuggestionfields to provide helpful feedback to your users. - Retry Logic: For
503errors, implement an exponential backoff retry strategy. For429errors, wait before retrying.