Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch JSONDecodeError #35

Merged
merged 1 commit into from
Nov 4, 2023
Merged

Catch JSONDecodeError #35

merged 1 commit into from
Nov 4, 2023

Conversation

pogzyb
Copy link
Owner

@pogzyb pogzyb commented Nov 4, 2023

When trying to find authoritative responses, an href that doesn't return valid json or returns a webpage can cause JSONDecodeError. In these scenarios just return None, so the previous response can be used.

When trying to find authoritative responses, an href that doesn't return valid json or returns a webpage can cause issues. In these scenarios just return previous response.
@pogzyb pogzyb marked this pull request as ready for review November 4, 2023 13:57
Copy link

codecov bot commented Nov 4, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (664c26a) 70.88% compared to head (190a905) 70.56%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #35      +/-   ##
==========================================
- Coverage   70.88%   70.56%   -0.32%     
==========================================
  Files           6        6              
  Lines         625      632       +7     
==========================================
+ Hits          443      446       +3     
- Misses        182      186       +4     
Files Coverage Δ
whodap/client.py 59.03% <55.55%> (-0.38%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pogzyb pogzyb merged commit 5bfad93 into main Nov 4, 2023
30 of 32 checks passed
@pogzyb pogzyb deleted the catch-jsondecodeerrors branch November 4, 2023 14:01
@pogzyb pogzyb mentioned this pull request Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant