When an ApsaraMQ for MQTT API call succeeds, the response returns HTTP status code 200. When a call fails, the response includes an HTTP error status code, an error code, and a descriptive message.
The following example shows the error response format:
{
"RequestId": "07AB2E7F-1EF8-4D08-A423-D58E3A26****",
"HostId": "onsmqtt.cn-hangzhou.aliyuncs.com",
"Code": "InstancePermissionCheckFailed",
"Message": "An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings."
}Use the tables below to identify the cause of a failed request and how to resolve it. Error codes are grouped by resource type.
Some error codes, such asInternalErrorandInstancePermissionCheckFailed, appear across multiple resource types. The cause and resolution are the same regardless of context.
Token errors
| HTTP status code | Error code | Error message | Cause | Solution |
|---|---|---|---|---|
| 404 | ApiNotSupport | The specified API is not supported. | The API operation is not supported. | Verify the API operation name and check the API reference for supported operations. |
| 400 | ApplyTokenOverFlow | You have applied for tokens too many times. Please try again later. | Token requests are being throttled. | Reduce the token request frequency and retry after a brief wait. |
| 400 | CheckAccountInfoFailed | An error occurred while checking the account information by the STS token. | The account information in the Security Token Service (STS) token could not be parsed. | Check that the STS token is valid and retry the request. |
| 400 | InstancePermissionCheckFailed | An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings. | The current account does not have permission to access this ApsaraMQ for MQTT instance. | Verify instance ownership and check that the required permissions are granted in your authorization policy. |
| 500 | InternalError | An error occurred while processing your request. Try again later. | An internal service error occurred. | Retry the request. If the error persists, contact Alibaba Cloud support. |
| 400 | ParameterCheckFailed | An error occurred while validating the parameters. The parameters may be missing or invalid. | One or more required parameters are missing or contain invalid values. | Check the API reference for the required parameters and valid value ranges, then correct your request. |
| 400 | PermissionCheckFailed | An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings. | The current account lacks the required permissions for the instance, topic, or group. | Review the ownership and authorization policies for each resource involved in the request. |
| 500 | SystemOverFlow | An error occurred while processing your request. Please try again. | The system is throttling requests. | Reduce your request rate and retry after a brief wait. |
| 400 | InvalidParameter.%s | An error occurred while validating the parameter. The parameter may be missing or invalid. | The parameter indicated by %s is missing or invalid. | Check the specific parameter named in the error code and provide a valid value. |
Group errors
| HTTP status code | Error code | Error message | Cause | Solution |
|---|---|---|---|---|
| 500 | CreateGroupIdError | Failed to create GroupId. Try again later. | The group could not be created. | Retry the request. If the error persists, contact Alibaba Cloud support. |
| 400 | GroupIdAlreadyExsited | The specified GroupId already exists. | A group with this ID already exists. | Use a different group ID, or use the existing group if it meets your needs. |
| 400 | GroupIdAlreadyUsedByOtherUsers | The current GroupId is used by another user. Please change to a different GroupId. | This group ID is used by another user. | Choose a different group ID. |
| 500 | InternalError | An error occurred while processing your request. Try again later. | An internal service error occurred. | Retry the request. If the error persists, contact Alibaba Cloud support. |
| 400 | ParameterFieldCheckFailed | Failed to validate the parameters. The parameters may be missing or invalid. | One or more required parameters are missing or contain invalid values. | Check the API reference for valid parameter names and values, then correct your request. |
| 400 | InstancePermissionCheckFailed | An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings. | The current account does not have permission to access this ApsaraMQ for MQTT instance. | Verify instance ownership and check that the required permissions are granted in your authorization policy. |
| 400 | InstanceNotFound | Failed to find the instance. The instanceId may be invalid. | No instance matches the specified instanceId. | Confirm that the instance exists and that the instanceId value in your request is correct. |
| 400 | PermissionCheckFailed | An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings. | The current account lacks the required permissions for the instance, topic, or group. | Review the ownership and authorization policies for each resource involved in the request. |
Topic errors
| HTTP status code | Error code | Error message | Cause | Solution |
|---|---|---|---|---|
| 400 | ParameterFieldCheckFailed | Failed to validate the parameters. The parameters may be missing or invalid. | One or more required parameters are missing or contain invalid values. | Check the API reference for valid parameter names and values, then correct your request. |
| 400 | MqttTopicNumExceeded | The maximum number of topics is exceeded. | The instance has reached its topic limit. | Delete unused topics to free up quota. |
| 400 | MqttTopicExist | The specified topic already exists. Please check the parameter. | A topic with this name already exists on the instance. | Use a different topic name, or use the existing topic if it meets your needs. |
| 400 | InstanceNotFound | Failed to find the instance. The instanceId may be invalid. | No instance matches the specified instanceId. | Confirm that the instance exists and that the instanceId value in your request is correct. |
| 400 | ResourcePermissionCheckFailed | An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings. | The current account lacks the required permissions for the specified resource. | Review the ownership and authorization policies for the instance, topic, and group. |
| 400 | CreateMqttTopicFailed | An error occurred while creating the MQTT topic. Please check the parameter and try again. | The topic could not be created on the ApsaraMQ for MQTT instance. | Check that all parameter values are valid, then retry. |
| 400 | InstancePermissionCheckFailed | An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings. | The current account does not have permission to access this ApsaraMQ for MQTT instance. | Verify instance ownership and check that the required permissions are granted in your authorization policy. |
| 400 | PermissionCheckFailed | An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings. | The current account lacks the required permissions for the instance, topic, or group. | Review the ownership and authorization policies for each resource involved in the request. |
Rule errors
| HTTP status code | Error code | Error message | Cause | Solution |
|---|---|---|---|---|
| 400 | ParameterFieldCheckFailed | Failed to validate the parameters. The parameters may be missing or invalid. | One or more required parameters are missing or contain invalid values. | Check the API reference for valid parameter names and values, then correct your request. |
| 400 | InstancePermissionCheckFailed | An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings. | The current account does not have permission to access this ApsaraMQ for MQTT instance. | Verify instance ownership and check that the required permissions are granted in your authorization policy. |
| 400 | PermissionCheckFailed | An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings. | The current account lacks the required permissions for the instance, topic, or group. | Review the ownership and authorization policies for each resource involved in the request. |
| 400 | ResourcePermissionCheckFailed | An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings. | The current account lacks the required permissions for the specified resource. | Review the ownership and authorization policies for the instance, topic, and group. |
| 400 | CreateMqttRuleFailed | An error occurred while creating the MQTT rule. Please check the parameter and try again. | The rule could not be created on the ApsaraMQ for MQTT instance. | Check that all parameter values are valid, then retry. |
| 400 | MqttRuleExist | The specified MQTT rule already exists. Please check the parameter. | The specified rule already exists on the instance. | Use a different rule configuration, or use the existing rule if it meets your needs. |
| 400 | MqttRuleNumExceeded | The maximum number of rules is exceeded. | The instance has reached its rule limit. | Delete unused rules to free up quota. |
| 400 | InstanceNotFound | Failed to find the instance. The instanceId may be invalid. | No instance matches the specified instanceId. | Confirm that the instance exists and that the instanceId value in your request is correct. |
For a complete list of ApsaraMQ for MQTT error codes, see Service error codes.