snoonetIRC / CloudBot

CloudBot - The simple, fast, expandable, open-source Python IRC Bot!
GNU General Public License v3.0
68 stars 52 forks source link

lastfm: Add more error info if the JSON is invalid #536

Closed linuxdaemon closed 5 years ago

linuxdaemon commented 5 years ago

If the web server returns a non-JSON response, the only error reported is a decode error, this makes it so decode errors will trigger .raise_for_status() as well, which will log all relevant information

codecov[bot] commented 5 years ago

Codecov Report

Merging #536 into gonzobot will increase coverage by 0.56%. The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##           gonzobot     #536      +/-   ##
============================================
+ Coverage     45.68%   46.24%   +0.56%     
============================================
  Files           216      220       +4     
  Lines         13025    13131     +106     
============================================
+ Hits           5950     6073     +123     
+ Misses         7075     7058      -17
Impacted Files Coverage Δ
tests/plugin_tests/test_lastfm.py 100% <100%> (ø)
plugins/lastfm.py 16.79% <100%> (+3.95%) :arrow_up:
plugins/chan_track.py 61.74% <0%> (-0.28%) :arrow_down:
tests/plugin_tests/test_optout.py 100% <0%> (ø)
cloudbot/util/mapping.py 100% <0%> (ø)
tests/core_tests/util_tests/test_mapping.py 100% <0%> (ø)
cloudbot/bot.py 23.34% <0%> (+1.32%) :arrow_up:
plugins/core/optout.py 22.64% <0%> (+1.99%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 153adcf...84dac4f. Read the comment docs.