MQTT v.5 Error Codes
The following table provides a comprehensive list of MQTT 5.0 error codes along with their descriptions. These error codes are used in MQTT 5.0 to indicate various conditions and errors that may occur during communication between clients and ThingsBoard platform.
| Error Code | Name | Packets | Description |
|---|---|---|---|
| 128 | Unspecified error | CONNACK, PUBACK, PUBREC, SUBACK, UNSUBACK, DISCONNECT | An unspecified error occurred. |
| 129 | Malformed Packet | CONNACK, DISCONNECT | Indicates that the received packet cannot be correctly parsed according to the protocol specifications. |
| 130 | Protocol Error | CONNACK, DISCONNECT | Protocol errors usually refer to errors that can be discovered only after the control packet is parsed according to the protocol specifications, including data that the protocol does not allow, behavior that does not conform to the protocol requirements, and so on. |
| 131 | Implementation specific error | CONNACK, PUBACK, PUBREC, SUBACK, UNSUBACK, DISCONNECT | The packet is valid, but not accepted by the current receiver’s implementation. |
| 132 | Unsupported Protocol Version | CONNACK | The requested protocol version is not supported by the server. |
| 133 | Client Identifier not valid | CONNACK | Only used for CONNACK packets, indicating that the Client ID is valid, but is not accepted by the server. For example, the Client ID exceeds the maximum length allowed by the server. |
| 134 | Bad User Name or Password | CONNACK | Only used for CONNACK packets, indicating that the client was refused a connection because it used an incorrect username or password. |
| 135 | Not authorized | CONNACK, PUBACK, PUBREC, SUBACK, UNSUBACK, DISCONNECT | Indicates that the operation is not authorized. For example, the client does not have permission to publish messages to the corresponding topic. |
| 136 | Server unavailable | CONNACK | Only used for CONNACK packets, indicating to the client that the server is currently unavailable. |
| 143 | Topic Filter invalid | PUBACK, PUBREC, DISCONNECT | The Topic Filter is in the correct format, but is not accepted by the server. For example, the level of Topic Filters exceeds the maximum number allowed by the server. |
| 144 | Topic Name invalid | PUBACK, PUBREC, DISCONNECT | The Topic Name is in the correct format, but is not accepted by the client or server. |
| 149 | Packet too large | CONNACK, DISCONNECT | The packet exceeds the maximum allowable size agreed upon at the time of connection. |
| 151 | Quota exceeded | CONNACK, PUBACK, PUBREC, SUBACK, DISCONNECT | An administratively imposed limit has been exceeded. |
| 153 | Payload format invalid | PUBACK, PUBREC, DISCONNECT | Indicates that the format of the Payload does not match the format indicated by the Payload Format Indicator property. |