Frontend & browser·The network from the browser
the request returned a 500 and your `.catch` never ran, because the promise resolved just fine.
fetch
Also calledFetch API, fetch()
The browser's promise-based HTTP API, which rejects only on network failure and never on an HTTP error status. Every wrapper written around it exists mostly to fix that one behaviour, along with JSON parsing and timeouts, which it also does not provide. It does give you streams, an abort signal and per-request cache and credential modes, which XHR never had.