isomorphic-fetch
isomorphic-fetch copied to clipboard
More correct http statuses in the README.md
I mean I guess it is true that the status codes between 200 and 400 would be ‘good’ … but if you are in control of your backend you would know what valid statuses it would reply with and in this case it would only ever reply with 200 if it's healthy… (In some ways it's safer to treat unexpected statuses as errors on the front end, even if they're technically valid HTTP status codes because you may want to have different behaviour)
In any case if you wanted to have such a broad check for “ok” statuses I think if (response.ok) { would be a better check …
I think I will close this without change but if you disagree please let me know.