Admits only 2xx responses from the wrapped Fetch implementation, reporting error responses and transport
failures alike as problems, so that a failed exchange is handled in one shape whatever caused it.
The same shape is available on its own to code handling failures raised elsewhere: any value may be recognised as a
problem, or normalised into one, so that a handler branches on problem details without first telling apart what it
was handed.
Uniform failure reporting middleware.
Admits only 2xx responses from the wrapped Fetch implementation, reporting error responses and transport failures alike as problems, so that a failed exchange is handled in one shape whatever caused it.
The same shape is available on its own to code handling failures raised elsewhere: any value may be recognised as a problem, or normalised into one, so that a handler branches on problem details without first telling apart what it was handed.
Usage
See
RFC 9457 - Problem Details for HTTP APIs