-
Notifications
You must be signed in to change notification settings - Fork 358
Open
Labels
Description
Python has https://requests.readthedocs.io/en/latest/_modules/requests/models/#Response.raise_for_status and it seems folks sometimes want something like that from fetch()
. You can branch on response.ok
already, but perhaps essentially asserting would be nicer?
(They really seem to expect it to reject automatically, but that's not something that makes sense for all callers.)
(Naming follows https://dom.spec.whatwg.org/#dom-abortsignal-throwifaborted.)
justinfagnani, reda-alaoui, philippone, knownasilya, lukewarlow and 4 more