Would you use response.throwIfNotOk()? Or is branching on response.ok sufficient?
@annevk I don’t think I would. I remember fetch throwing, but not on >= 400, being a bit confusing on first encounter, but I don’t think explicitly requesting an exception solves that. I could see myself maybe using a throwOnErrorResponse parameter to fetch (so there would be a single exception to catch), but not if I already had a Response object.
@holst with async/await and try/catch there would be almost no difference between those two options. We have something similar for abort signals.