Fix: narrow JSON parse try-blocks and added guards
[!NOTE] Low Risk Low risk: changes only harden JSON parsing/error-message construction and should reduce false positives/crashes, with minimal behavior change aside from skipping non-dict JSON payloads.
Overview Tightens JSON parsing in
find_rewardandfind_contentto only wrapjson.loadsin thetry, then skips invalid JSON or non-dict payloads before scanning for accepted keys.Refactors
HudRequestError.from_httpx_errorto parseresponse.json()into a temporary value, only treat dict JSON as structured error data, and consistently build the fallback message while optionally appending small JSON responses.Reviewed by Cursor Bugbot for commit 84213217c19270c8228c64f96f5f88656b7375d4. Bugbot is set up for automated code reviews on this repo. Configure here.