disguise developers

Error Handling

Disguise Cloud API provides a consistent error response structure to help you handle errors effectively. All errors will have the following return structure:

{
  "error": {
    "message": "Example message",
    "details": "Example details providing further context"
  }
}

Error Response Structure

The error response contains two main fields:

In addition, you will receive standard HTTP status codes to indicate the type of error that occurred as per RESTful API conventions.

Common Errors

Here are some common errors you might encounter while using the Cloud API:

To see all status codes the API uses, please refer to Status Codes.

Handling Errors

To handle errors effectively, you should:

  1. Check the message and details fields in the error response to understand the cause of the error.
  2. Implement appropriate error handling in your code based on the error type.
  3. Contact support if you encounter an error that you cannot resolve.

By following these guidelines, you can ensure that your applications handle errors gracefully and maintain smooth interaction with the Disguise Cloud API.