Skip to content

Commit

Permalink
Handle invalid json as success
Browse files Browse the repository at this point in the history
  • Loading branch information
kraxarn committed Aug 25, 2024
1 parent a288e8a commit 62d375d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/include/lib/spotify/request.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,9 @@ namespace lib
}
catch (const nlohmann::json::parse_error &e)
{
lib::log::debug("JSON: {}", data);
return lib::result<void *>::fail(e.what());
log::debug("Failed to parse json: {}", e.what());
log::debug("JSON: {}", data);
return result<void *>::ok(nullptr);
}
catch (const std::exception &e)
{
Expand Down

0 comments on commit 62d375d

Please sign in to comment.