I really like fetch. That said, I still think it's silly that it doesn't reject on statuses between 400 and 600. Literally forced to write a then that checks and throws all the time. It's a shame that ship has sailed. It's still WAY easier to wrap than XHR though.
-
-
Replying to @BenLesh
There are quite a few APIs that use a 404 code when some data is not found, even though this is meant to only be used for errors caused by a bad request by the client. At the very least 200 vs 404 is contentious. Not finding data isn't necessarily an error.
2 replies 0 retweets 2 likes
What I mean is that: no matter what the default is, you would often need to alter the handling of 404 depending on the design/intentions of the API you are integrating with.
10:29 AM - 30 Jul 2019
0 replies
0 retweets
2 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.