You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This test is a bit too strict: any HTTP status code bewteen 200 and 299 should be considered successful and not throw an error.
Also, it would be nice if the Error thrown, in addition to the responseText property, included a responseCode property that contained res.statusCode, as that's useful information when handling errors.
The text was updated successfully, but these errors were encountered:
dossy
added a commit
to dossy/simple-get-promise
that referenced
this issue
Feb 21, 2022
Specifically, I'm looking at these lines in
src/index.js
:This test is a bit too strict: any HTTP status code bewteen 200 and 299 should be considered successful and not throw an error.
Also, it would be nice if the
Error
thrown, in addition to theresponseText
property, included aresponseCode
property that containedres.statusCode
, as that's useful information when handling errors.The text was updated successfully, but these errors were encountered: