polarity-integration-utils
    Preparing search index...

    Interface PolarityRequestHooks

    Hooks for customizing the PolarityRequest lifecycle. All hook arrays execute in order. beforeRequest and afterResponse hooks chain their output, while error hooks run sequentially and can suppress errors by returning without throwing.

    interface PolarityRequestHooks {
        afterResponse?: AfterResponseHook[];
        beforeRequest?: BeforeRequestHook[];
        onApiError?: OnApiErrorHook[];
        onNetworkError?: OnNetworkErrorHook[];
    }
    Index
    afterResponse?: AfterResponseHook[]

    Hooks that run after a successful HTTP response. Each hook receives the response from the previous hook and the return value is passed to the next hook (or returned to the caller).

    beforeRequest?: BeforeRequestHook[]

    Hooks that run before each HTTP request. Each hook receives a copy of the request options and the return value is passed to the next hook (or used for the request).

    onApiError?: OnApiErrorHook[]

    Hooks that run when an API error is detected. Each hook receives the error and the full HTTP response. If all hooks return without throwing, the error is suppressed.

    onNetworkError?: OnNetworkErrorHook[]

    Hooks that run when a network or rate-limiting error occurs. If all hooks return without throwing, the error is suppressed.