If an error occurs when you access Image Processing (IMG), IMG returns an error code and an error message. This helps you locate and fix the error.

Error response format

The following example shows an error response:

<Error>
  <Code>BadRequest</Code>
  <Message>Input is not base64 decoding.</Message>
  <RequestId>52B155D2D8BD99A15D0005FF</RequestId>
  <HostId>userdomain</HostId>
</Error>

The error response contains the following elements:

  • Code: the error code that IMG returns to the user.
  • Message: the detailed error information provided by IMG.
  • RequestId: the UUID used to identify an error request. If the problem persists, you can send this UUID to technical support to help locate the cause of the error.
  • HostId: the ID used to identify the accessed IMG cluster.

Error codes

The following table describes the error codes contained in responses to IMG requests.

Error code Description Solution
InvalidArgument The error message returned because the parameter is invalid. HTTP status code 400
BadRequest The error message returned because a request error occurs.
MissingArgument The error message returned because a required parameter is not specified.
ImageTooLarge The error message returned because the image size exceeds the limit.
WatermarkError The error message returned because a watermark error occurs.
NotImplemented The error message returned because the access is denied.
AccessDenied The error message returned because access is denied. HTTP 403 status code
SignatureDoesNotMatch The error message returned because the signature calculated by OSS does not match the signature provided in the request.
NoSuchKey The error message returned because the specified image does not exist. HTTP 404 status code
NoSuchStyle The error message returned because the specified style does not exist.
InternalError The error message returned because an internal error occurs. HTTP 500 status code

SDK demos