TRIVERSE Docs
Getting Started

Errors

Triverse uses standard HTTP response codes to indicate the success or failure of an API request. In general:

  • Codes in the 2xx range indicate success.
  • Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.).
  • Codes in the 5xx range 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:

CodeHTTP StatusDescription
1004400Invalid Parameters: The request parameters are invalid (e.g., file too large, URL inaccessible).
1005404Resource Not Found: The requested resource does not exist or you lack permission.
1006404Task Not Found: The specified task does not exist or belongs to another user.
2000429Rate Limit Exceeded: Upload frequency limit reached or task queue is full.
2002400Unsupported Task: The requested task type is not supported.
2004400Unsupported File: The file format is not supported for this operation.
2005409Conflict: The task is not in a state that allows this operation.
2008400Content Violation: The content failed the safety audit.
2010403Insufficient Credits: Your API credit balance is too low for this task.
4042404No Assets: The task succeeded but produced no downloadable assets.
5003503Service Unavailable: A required backend service (Storage, Prefect, or Audit) is down.
5004500Invalid Flow: The internal flow name is invalid.
5005500Persistence Error: Failed to recover or track the task state.

Handling Errors

We recommend implementing robust error handling in your integration:

  1. Check HTTP Status: Always check the HTTP status code first.
  2. Log Internal Codes: Log the code field for debugging and support purposes.
  3. User Feedback: Use the message and suggestion fields to provide helpful feedback to your users.
  4. Retry Logic: For 503 errors, implement an exponential backoff retry strategy. For 429 errors, wait before retrying.

On this page