Errors

Error Handling in Vome API

The Vome API uses conventional HTTP status codes to indicate the success or failure of API requests. This page outlines common HTTP status codes you might encounter and the corresponding error types with descriptions to help you handle these errors programmatically.

HTTP Status Code Summary

Status Code
Description
Notes

200

OK

The request was successful.

400

Bad Request

Invalid request format or parameters.

401

Unauthorized

Authentication credentials were not provided or are invalid.

403

Forbidden

The API key doesn’t have permissions to perform the request.

404

Not Found

The requested resource doesn’t exist.

409

Conflict

The request conflicts with another request.

429

Too Many Requests

Rate limiting has been applied.

500, 502, 503, 504

Server Errors

Issues on Vome's servers (rare). Please contact us if experienced.

Error Types

Errors returned from the Vome API include a structured payload that helps identify the issue clearly. Below are the types of errors that could be returned:

  • api_error: Covers general API processing errors.

  • authentication_error: Problems related to authentication or authorization.

  • invalid_request_error: Errors due to invalid request parameters.

  • rate_limit_error: Errors related to exceeding the rate limit.

Error Object Attributes

  • type (enum): The category of the error encountered (e.g., api_error, authentication_error).

  • code (string): A more specific code indicating the type of error (optional).

  • message (string): A human-readable explanation specific to this occurrence of the problem.

  • param (string): The specific parameter related to the error (if applicable).

Example Error Response

Here’s how an error might be structured in a JSON response:

{
    "error": {
        "type": "invalid_request_error",
        "code": "missing_field",
        "message": "The 'email' field is required.",
        "param": "email"
    }
}

Handling Errors

When handling errors from the Vome API, it is crucial to check the HTTP status code and the error type returned in the response. This information should guide the corrective measures:

  1. Validate Request Parameters: Ensure that all required fields are included and that data formats are correct.

  2. Handle Rate Limits Gracefully: Implement exponential backoff or request retry mechanisms with delays.

  3. Log and Monitor: Keep detailed logs of the errors encountered and monitor the frequency to identify potential improvements in client-side integration or user data entry practices.

Last updated