Can anyone think of a good reason why the masses of Javascripters decided that the norm is to throw an error on non-OK HTTP responses?? Because I can't.
To me, this is a terrible practice, and everyone just seems hypnotized by it, like moths to the flame.
I hear you all, potential moths. 😄
I don't think this is a norm in the general case. But if you're expecting an okay response and you don't get one, it makes sense to throw an error. If you're expecting a non-okay response, then it doesn't make sense to throw an error.