From 62d375d202581c44760bc78ced5c336a7041083d Mon Sep 17 00:00:00 2001 From: kraxarn Date: Sun, 25 Aug 2024 12:55:58 +0200 Subject: [PATCH] Handle invalid json as success --- lib/include/lib/spotify/request.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/include/lib/spotify/request.hpp b/lib/include/lib/spotify/request.hpp index 05d1f4d1..3b6fcf39 100644 --- a/lib/include/lib/spotify/request.hpp +++ b/lib/include/lib/spotify/request.hpp @@ -224,8 +224,9 @@ namespace lib } catch (const nlohmann::json::parse_error &e) { - lib::log::debug("JSON: {}", data); - return lib::result::fail(e.what()); + log::debug("Failed to parse json: {}", e.what()); + log::debug("JSON: {}", data); + return result::ok(nullptr); } catch (const std::exception &e) {