mirror of
https://github.com/esphome/esphome.git
synced 2026-09-17 18:18:43 +00:00
[nextion] Add error log for failed HTTP status during TFT upload (#14190)
This commit is contained in:
@@ -220,6 +220,7 @@ bool Nextion::upload_tft(uint32_t baud_rate, bool exit_reparse) {
|
||||
}
|
||||
|
||||
if (code != 200 and code != 206) {
|
||||
ESP_LOGE(TAG, "HTTP request failed with status %d", code);
|
||||
return this->upload_end_(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -238,6 +238,7 @@ bool Nextion::upload_tft(uint32_t baud_rate, bool exit_reparse) {
|
||||
esp_get_free_heap_size());
|
||||
int status_code = esp_http_client_get_status_code(http_client);
|
||||
if (status_code != 200 && status_code != 206) {
|
||||
ESP_LOGE(TAG, "HTTP request failed with status %d", status_code);
|
||||
return this->upload_end_(false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user