log the uncatched MQTT connection error

This commit is contained in:
CaCO3
2024-10-05 22:42:51 +02:00
parent 775f9dcb14
commit b34fdd937b

View File

@@ -174,7 +174,7 @@ static esp_err_t mqtt_event_handler_cb(esp_mqtt_event_handle_t event) {
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Connection refused, not authorized. Check username/password (0x05)");
}
else {
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Other event id:" + event->error_handle->connect_return_code);
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Other event id:" + std::to_string(event->error_handle->connect_return_code));
ESP_LOGE(TAG, "Other event id:%d", event->error_handle->connect_return_code);
}