Fetch is weird like that. Network errors? Rejected promise. HTTP errors? "Here’s a response, good luck!"
I handle it by creating a custom fetch wrapper that throws on non-2xx. Also, `ky` is a solid alternative if you want something fetch-like but with sane defaults.
I handle it by creating a custom fetch wrapper that throws on non-2xx. Also, `ky` is a solid alternative if you want something fetch-like but with sane defaults.
