This topic describes how to determine whether a Message Service (MNS) API operation succeeds or fails based on the response.
After you call an API operation, the response is displayed in a uniform format. A returned HTTP status code of 2xx indicates that the call succeeds. A returned HTTP status code of 4xx or 5xx indicates that the call fails. Success responses are in the XML format. Sample responses in this topic are formatted to improve readability. Actual responses are not formatted with line breaks or indentation.
Responses in the XML format include the result of the request and the details of the operation. Example:
<? xml version="1.0" encoding="utf-8"? > <!--Result root node--> <Root node xmlns="http://mns.aliyuncs.com/doc/v1/"> <!--Returned child node--> </Root node>
If an error occurs when you call an operation, no data is returned. For more information about error codes, see Error codes.
However, HTTP status code 4xx or 5xx is returned. The response body contains the specific error code and error message. The response body contains the error code, error message, globally unique request ID (RequestId), and ID of the site you accessed with this request (HostId). If you cannot identify the error cause, contact Alibaba Cloud and provide your HostId and RequestId.