- From: Domenic Denicola <notifications@github.com>
- Date: Wed, 05 Aug 2015 08:08:58 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
Received on Wednesday, 5 August 2015 15:11:29 UTC
I don't think this sugar is worth it. `{ requiredStatus: ok }` saves very little characters over `.then(res => { if (!res.ok) throw new TypeError() })`, even with an informative message. And as you note, it spreads to more and more of the API. People just need to realize the underlying mental model is that fetch returns responses, and responses can be not-OK, and they should handle that. --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/issues/103#issuecomment-128031313
Received on Wednesday, 5 August 2015 15:11:29 UTC