Error response format

Last Updated: Mar 31, 2017

If an error occurs when the user accesses MNS, MNS returns the HTTP status code 3xx, 4xx or 5xx and a message body in text/xml format.

Example of an error message body:

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <Error xmlns="http://mns.aliyuncs.com/doc/v1/">
  3. <Code>InvalidArgument</Code>
  4. <Message>Authorization header is invalid or missing.</Message>
  5. <RequestId>04bb60e3-28aa-4706-99b0-9345d834f266</RequestId>
  6. <HostId>mns.cn-hangzhou.aliyuncs.com</HostId>
  7. </Error>

All error message bodies include the following elements:

  • Code: the error code returned by MNS to the user.

  • Message: the detailed error information provided by MNS.

  • RequestId: the ID that uniquely identifies the request. When you cannot solve the problem, you can seek help from MNS support engineers by offering this RequestId to them.

  • HostId: the ID that identifies the MNS cluster to be accessed.

For special error information elements, see the specific request descriptions.

Thank you! We've received your feedback.