esp_mqtt_error_codes struct
*MQTT* error code structure to be passed as a contextual information into ERROR event Important: This structure extends `esp_tls_last_error` error structure and is backward compatible with it (so might be down-casted and treated as `esp_tls_last_error` error, but recommended to update applications if used this way previously) Use this structure directly checking error_type first and then appropriate error code depending on the source of the error: | error_type | related member variables | note | | MQTT_ERROR_TYPE_TCP_TRANSPORT | esp_tls_last_esp_err, esp_tls_stack_err, esp_tls_cert_verify_flags, sock_errno | Error reported from tcp_transport/esp-tls | | MQTT_ERROR_TYPE_CONNECTION_REFUSED | connect_return_code | Internal error reported from *MQTT* broker on connection |
Fields
last esp_err code reported from esp-tls component.
tls specific error code reported from underlying tls stack.
tls flags reported from underlying tls stack during certificate verification.
error type referring to the source of the error.
connection refused error code reported from MQTT* broker on connection.
errno from the underlying socket.
![]()
typedef struct esp_mqtt_error_codes {
esp_mqtt_error_codes is allocated by 1 symbol and is freed by 1 symbol:
![]()
esp_mqtt_error_codes