Skip to content

Commit

Permalink
chore(HTTP): log reason on open connection fail
Browse files Browse the repository at this point in the history
  • Loading branch information
becem-gharbi committed Jun 22, 2024
1 parent f0d0e29 commit 4e7d619
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/HTTP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace ESPAdmin
esp_err_t err = esp_http_client_open(client, 0);
if (err != ESP_OK)
{
_logger.error(F("failed to open connection"));
_logger.error("failed to open connection %s", esp_err_to_name(err));
esp_http_client_cleanup(client);
return "";
}
Expand Down Expand Up @@ -108,7 +108,7 @@ namespace ESPAdmin
esp_err_t err = esp_http_client_open(client, content.length());
if (err != ESP_OK)
{
_logger.error(F("failed to open connection"));
_logger.error("failed to open connection %s", esp_err_to_name(err));
esp_http_client_cleanup(client);
return "";
}
Expand Down

0 comments on commit 4e7d619

Please sign in to comment.