All Products
Search
Document Center

Simple Message Queue (formerly MNS):Error codes

Last Updated:Feb 27, 2026

When an API request to Simple Message Queue (formerly MNS) fails, the service returns an HTTP error status code (3xx, 4xx, or 5xx) and an XML or text response body that contains the error details. This topic describes the error response format and lists all error codes with their recommended solutions.

Error response format

An error response has the following XML structure:

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

The following table describes each element in the error response body.

ElementDescription
CodeThe error code that identifies the type of error.
MessageA detailed error message.
RequestIdThe unique ID of the request. Provide this ID when you contact technical support.
HostIdThe endpoint of the Simple Message Queue (formerly MNS) instance that processed the request.

For operation-specific errors, see the API documentation for the corresponding operation.

Error code list

The following tables list the error codes grouped by category. Each entry includes the HTTP status code, error code, error message returned by the API, and the recommended solution.

Authentication and authorization errors

HTTP status codeError codeError messageRecommended solution
400InvalidAuthorizationHeaderThe Authorization header format is invalid.The Authorization header is incorrectly formatted. Verify that your AccessKey ID and AccessKey secret are valid.
400MissingAuthorizationHeaderAuthorization header is required.The Authorization header is missing. Add the required header to your request. For more information, see Common parameters.
400InvalidDateHeaderThe Date header format is invalid.The Date header is incorrectly formatted. For more information, see Common parameters.
400MissingDateHeaderDate header is required.The Date header is missing. Add the required header to your request. For more information, see Common parameters.
400InvalidDegistThe Content-MD5 you specified is invalid.The Content-MD5 header value is invalid. Recalculate and set the correct Content-MD5 value.
403AccessDeniedThe OwnerId that your Access Key Id associated to is forbidden for this operation.The account associated with the AccessKey ID does not have permission for this operation. Verify that you are using the correct AccessKey ID and that the account has the required permissions.
403InvalidAccessKeyIdThe AccessKey Id you provided is not exist.The specified AccessKey ID does not exist. Verify that the AccessKey ID is correct.
403SignatureDoesNotMatchThe request signature we calculated does not match the signature you provided. Check your key and signing method.The request signature is invalid. Check your AccessKey secret and signing method. For more information, see Sign requests.
408TimeExpiredThe http request you sent is expired.The time difference between the client and the server exceeds 15 minutes. Synchronize your local system clock.

Request validation errors

HTTP status codeError codeError messageRecommended solution
400InvalidRequestURLHttp request URL format invalid.The request URL format is invalid. Check the URL against the API documentation.
400InvalidQueryStringHttp request URL contains invalid querystring item "{QueryString}".The request URL contains an invalid query string parameter. Remove or correct the invalid parameter.
400MalformedXMLThe XML you provided was not well-formed.The XML request body is malformed. Validate the XML syntax before sending the request.
400InvalidArgumentThe length of message should not be larger than MaximumMessageSize.The message body exceeds the maximum allowed size. Reduce the message size or increase the MaximumMessageSize of the queue.
400InvalidArgumentA subscription's MaximumMessageSize should be greater than the topic's MaximumMessageSize!The subscription's MaximumMessageSize must be greater than or equal to the topic's MaximumMessageSize. Increase the subscription's MaximumMessageSize value.
400InvalidArgumentThe XML you provided did not validate against our published schema, cause by {Parameter}.The XML request body does not conform to the expected schema. Check the specified parameter and correct the XML structure.
400InvalidArgumentThe value of {Parameter} should between {Min} and {Max} seconds/bytes.A parameter value is out of range. Set the parameter value within the specified range.
Note: In the error messages above, {Parameter} represents a parameter in the XML request body, {Min} and {Max} represent the minimum and maximum allowed values, and {QueryString} represents a query string parameter in the request URL.

Resource naming errors

HTTP status codeError codeError messageRecommended solution
400InvalidQueueNameThe queue name you provided is invalid. QueueName should start with alpha and contain only alpha, digit or -.The queue name must start with a letter and contain only letters, digits, and hyphens (-).
400QueueNameLengthErrorQueue name length should between 1 and 255.The queue name must be 1 to 255 characters in length.
400TopicNameInvalidThe topic name you provided is invalid. TopicName should start with alpha or digit and contain only alpha, digit or -.The topic name must start with a letter or digit and contain only letters, digits, and hyphens (-).
400TopicNameLengthErrorTopic name length is out of range, should be between 1 and 255.The topic name must be 1 to 255 characters in length.
400SubscriptionNameInvalidThe subscription name you provided is invalid. SubscriptionName should start with alpha or digit and contain only alpha, digit or -.The subscription name must start with a letter or digit and contain only letters, digits, and hyphens (-).
400SubscriptionNameLengthErrorSubscription name length is out of range, should be between 1 and 255.The subscription name must be 1 to 255 characters in length.
400EndpointInvalidThe format of endpoint you provided is invalid.The endpoint format is invalid. For more information, see Endpoint.

Message and receipt handle errors

HTTP status codeError codeError messageRecommended solution
400MissingReceiptHandleReceiptHandle is required.Include the ReceiptHandle parameter in your request.
400MissingVisibilityTimeoutVisibilityTimeout is required.Include the VisibilityTimeout parameter in your request.
400ReceiptHandleErrorThe receipt handle you provide is not valid.The receipt handle is invalid. Use a valid receipt handle obtained from a ReceiveMessage operation.
404MessageNotExistMessage not exist.No messages are available in the queue. The queue is empty or all messages are currently invisible.
404MessageNotExistThe receipt handle you provided has expired.The receipt handle has expired because the message was not processed within the visibility timeout period. Process messages within the visibility timeout period, or increase the visibility timeout value.

Resource not found and conflict errors

HTTP status codeError codeError messageRecommended solution
404QueueNotExistThe queue name you provided does not exist.The specified queue does not exist. Create the queue before performing this operation.
404TopicNotExistThe topic name you provided does not exist.The specified topic does not exist. Create the topic before performing this operation.
404SubscriptionNotExistThe subscription you provided does not exist.The specified subscription does not exist. Create the subscription before performing this operation.
409QueueAlreadyExistThe queue you want to create is already exist.A queue with the same name already exists with different attributes. Use a different name or ensure the attributes match the existing queue.
409TopicAlreadyExistThe topic you want to create already exists.A topic with the same name already exists with different attributes. Use a different name or ensure the attributes match the existing topic.
409SubscriptionAlreadyExistThe subscription you want to create already exists.A subscription with the same name already exists with different attributes. Use a different name or ensure the attributes match the existing subscription.

Throttling errors

HTTP status codeError codeError messageRecommended solution
400QpsLimitExceededThe qps limit of the queue is exceeded.The number of queries per second (QPS) exceeds the limit. Reduce the request rate or contact technical support to increase the QPS limit.
429TooManyRequestsThe request is denied by cluster flow limiter for too many requests.The request is throttled at the cluster level. Implement exponential backoff and retry the request. For more information, see Throttling policy.

Server errors

HTTP status codeError codeError messageRecommended solution
500InternalErrorInteral error.An internal server error occurred. Retry the request with exponential backoff. If the error persists, contact technical support and provide the RequestId from the response.
500InternalServerErrorInteral error.An internal server error occurred. Retry the request with exponential backoff. If the error persists, contact technical support and provide the RequestId from the response.