Description

If there is a problem with any of the data sent to the IMG Processing API, or the request itself fails for any reason, the API will return an error response that is handled by the client and thrown as an IMGProcessingAPIError object, this way you can handle the error in your code, and have access to the error properties.

Properties

The IMGProcessingAPIError object has the following properties:

type
string

The type of error that occurred, as a link to the error documentation.

error
string

The error message.

status
number

The HTTP status code of the error.

message
string

A human-readable message describing the error.

errors
array

An array of error messages if the error is a ValidationError.

Examples