intuit / oauth-jsclient

Intuit's NodeJS OAuth client provides a set of methods to make it easier to work with OAuth2.0 and Open ID
https://developer.intuit.com/
Apache License 2.0
120 stars 154 forks source link

Accept Full Range of HTTP Success Codes #78

Closed zinaschroeder closed 4 years ago

zinaschroeder commented 4 years ago

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 commented 4 years ago

Coverage Status

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

coveralls commented 4 years ago

Coverage Status

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