From 1c21c48e40400db59802965c85d0b6e54a7c01f0 Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 Date: Sat, 11 Dec 2021 23:23:33 +0100 Subject: [PATCH] Show url when client cannot be constructed --- src/asynchttprequest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/asynchttprequest.cpp b/src/asynchttprequest.cpp index 362b66f..098da73 100644 --- a/src/asynchttprequest.cpp +++ b/src/asynchttprequest.cpp @@ -160,9 +160,9 @@ tl::expected 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);