UNPKG

advanced-retry

Version:
14 lines (13 loc) 680 B
import { ErrorFilter } from './base'; export declare function errorToStatusCode(error: unknown): number | null; /** * Creates a filter that matches if the error has any of the specified status codes */ export declare const statusCodeErrorFilterAny: <X>(statusCodes: number[]) => ErrorFilter<X>; /** * Creates a filter that matches errors within a status code range (inclusive) */ export declare const statusCodeErrorFilterRange: <X>(min: number, max: number) => ErrorFilter<X>; export declare const serverErrorErrorFilter: ErrorFilter<unknown>; export declare const clientErrorErrorFilter: ErrorFilter<unknown>; export declare const redirectErrorFilter: ErrorFilter<unknown>;