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

Accept Full Range of HTTP Success Codes #78

Merged
merged 1 commit into from
Apr 10, 2020
Merged

Accept Full Range of HTTP Success Codes #78

merged 1 commit into from
Apr 10, 2020

Conversation

zinaschroeder
Copy link
Contributor

I noticed as I was using this package that the Intuit Payment API in particular doesn't always respond with 200 status codes. Currently, this package is written to only consider 200 codes successful, so to prevent my code from breaking, I needed the client to accept any status that would normally count as a "success" as valid. I've modified the single line validity check to accept anything within the 2XX range.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 91.406% when pulling 9fd9b4b on zinaschroeder:validstatuscodes into f67968e on intuit:develop.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 91.406% when pulling 9fd9b4b on zinaschroeder:validstatuscodes into f67968e on intuit:develop.

@abisalehalliprasan abisalehalliprasan merged commit 5bd3e05 into intuit:develop Apr 10, 2020
@abisalehalliprasan abisalehalliprasan mentioned this pull request Apr 10, 2020
abisalehalliprasan added a commit that referenced this pull request Apr 10, 2020
* Accept HTTP status codes between 199 and 300 as successes (#78)

* Fix: handle not JSON content in response parsing (#59)

* Coveralls Badge Fix

* Coveralls Badge Fix:Final

* Coveralls Badge Fix : istanbul package added

* Coveralls Badge Fix + snyk added

* Coveralls Badge Fix + snyk added

* Snyk removed from Makefile

* Snyk removed for timebeing

* Add more code coverage for OAuthClient (#54)

* Add better code coverage in OAuthClient

* Fix: ValidateIdToken method and unit tests (#58)

* Fix validateIdToken tests

* Pointing README Badge to Develop

* Pointing README Badge to Develop

* Update Develop Coverage Badge

* Fix: handle not JSON content in response parsing

Some intuit API as invoice download return not JSON content (PDF in this
case). `makeApiCall` wasn't working with it because of mandatory
response body parsing.

So if the response is not JSON, we don't want to parse the body.
And simply let the caller decide what to do with it.

Co-authored-by: abisalehalliprasan <anil_kumar3@intuit.com>
Co-authored-by: Oscar Rabasa <oscargrp@gmail.com>
Co-authored-by: Kevin Tang <kevin.hm.tang@gmail.com>
Co-authored-by: abisalehalliprasan <38014312+abisalehalliprasan@users.noreply.github.com>

* Release : 2.1.0

* Release : 2.1.0

* Release : 2.1.0 : Revert back dependencies

* Release : 2.1.0 : Revert back dependencies

Co-authored-by: Zina Schroeder <zina.schroeder@gmail.com>
Co-authored-by: Sébastien Boulle <sebastien@cleany.fr>
Co-authored-by: Oscar Rabasa <oscargrp@gmail.com>
Co-authored-by: Kevin Tang <kevin.hm.tang@gmail.com>
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.

3 participants