thermondo / closeio

(deprecated/unused) A small API library to access close.io CRM
Other
3 stars 1 forks source link

Catch JSONDecodeError when checking webhook signature #140

Closed anneFly closed 5 years ago

anneFly commented 5 years ago

This change catches an error that would appear when the request that is passed to webhook_signature_valid does not have a valid json body. This fixes a problem with swagger when the method webhook_signature_valid was used in a DRF permission.

codecov[bot] commented 5 years ago

Codecov Report

Merging #140 into master will increase coverage by 0.12%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #140      +/-   ##
==========================================
+ Coverage    59.1%   59.22%   +0.12%     
==========================================
  Files          10       10              
  Lines         983      986       +3     
==========================================
+ Hits          581      584       +3     
  Misses        402      402
Impacted Files Coverage Δ
closeio/contrib/django/utils.py 84.61% <100%> (+1.28%) :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 f4c1c07...ad24bbb. Read the comment docs.