From a2587b39ba05592a0806000dc5025a639473d360 Mon Sep 17 00:00:00 2001 From: mxaddict Date: Sat, 5 Feb 2022 22:42:46 +0800 Subject: [PATCH] Added error log for response data when json parsing error occurs (#922) --- src/qt/navcoingui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qt/navcoingui.cpp b/src/qt/navcoingui.cpp index 88c0af70d..709c994a8 100644 --- a/src/qt/navcoingui.cpp +++ b/src/qt/navcoingui.cpp @@ -2056,9 +2056,9 @@ void NavcoinGUI::updatePrice() info("Updating prices"); std::thread pThread{[this]{ + std::string response; try { CURL *curl; - std::string response; std::string url( "https://api.coingecko.com/api/v3/simple/price?ids=nav-coin&vs_currencies=" "BTC," @@ -2164,6 +2164,7 @@ void NavcoinGUI::updatePrice() catch (const boost::property_tree::json_parser::json_parser_error& e) { error("Could not parse price data json 'boost::property_tree::json_parser::json_parser_error'"); + error("RAW Response: " + response); } catch (const std::runtime_error& e) {