Stranger6667 / postmarker

Python client library for Postmark API
https://postmarker.readthedocs.io/en/stable/
MIT License
134 stars 29 forks source link

Handle error responses that do not contain JSON #164

Closed micthiesen closed 6 years ago

micthiesen commented 6 years ago

Closes #163

codecov[bot] commented 6 years ago

Codecov Report

Merging #164 into master will decrease coverage by 0.22%. The diff coverage is 60%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #164      +/-   ##
==========================================
- Coverage     100%   99.77%   -0.23%     
==========================================
  Files          22       22              
  Lines         873      876       +3     
  Branches       74       74              
==========================================
+ Hits          873      874       +1     
- Misses          0        2       +2
Impacted Files Coverage Δ
postmarker/core.py 97.8% <60%> (-2.2%) :arrow_down:

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 c0c0f7a...2e43733. Read the comment docs.

Stranger6667 commented 6 years ago

Hej! Thank you for your contribution! :)

Could you give me some example of such payload from Postmark?

micthiesen commented 6 years ago

Hey np! I wasn't able to retrieve an example payload yet since the ValueError that was being raised didn't include much useful information.

Since our use case with Postmark is very simple, we're going to switch to use requests in our app. If it happens again I'll update this PR with what the response looks like. In the meantime feel free to close this.

Stranger6667 commented 6 years ago

I believe, that the case is important indeed and I'm happy to merge it :) I'll take care about the testing later

Stranger6667 commented 6 years ago

Released in 0.12.1

micthiesen commented 6 years ago

Thanks for the quick release! Much appreciated.

Stranger6667 commented 6 years ago

You're welcome :)