Show url when client cannot be constructed

This commit is contained in:
2021-12-11 23:23:33 +01:00
parent 1185eadec4
commit 1c21c48e40

View File

@@ -160,9 +160,9 @@ tl::expected<void, std::string> AsyncHttpRequest::createClient(std::string_view
if (!m_client)
{
constexpr auto msg = "http client could not be constructed";
ESP_LOGE(TAG, "%s", msg);
return tl::make_unexpected(msg);
auto msg = fmt::format("http client could not be constructed (url={})", url);
ESP_LOGE(TAG, "%.*s", msg.size(), msg.data());
return tl::make_unexpected(std::move(msg));
}
ESP_LOGD(TAG, "created http client %s", m_taskName);