polarity-integration-utils
    Preparing search index...

    Type Alias OnApiErrorHook

    OnApiErrorHook: (
        error: ApiRequestError,
        response: HttpRequestResponse,
        requestOptions: HttpRequestOptions,
        userOptions: DoLookupUserOptions,
    ) => Promise<void>

    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.

    Type Declaration