Hook that runs when an API error is detected (non-success status code or error
properties found in the response body). Receives the full HTTP response so the
hook can inspect status codes, headers, and body.
If all registered hooks return without throwing, the error is suppressed and
the HTTP response is returned to the caller. To propagate or replace the error,
throw from within the hook.
Hook that runs when an API error is detected (non-success status code or error properties found in the response body). Receives the full HTTP response so the hook can inspect status codes, headers, and body.
If all registered hooks return without throwing, the error is suppressed and the HTTP response is returned to the caller. To propagate or replace the error, throw from within the hook.