Skip to main content

Class: RetryInterceptor

Constructors

Constructor

new RetryInterceptor(maxRetries, fetchImpl?): RetryInterceptor

Parameters

Returns

RetryInterceptor

Methods

onError()

onError(__namedParameters): Promise<Error | Response>
Recover from a thrown transport error by retrying eligible requests. If a retry produces a response we return it (openapi-fetch then runs the normal onResponse chain on it); otherwise we surface a normalized NetworkError so error mapping is consistent with the response path.

Parameters

Returns

Promise<Error | Response>

onRequest()

onRequest(__namedParameters): Request

Parameters

Returns

Request

onResponse()

onResponse(__namedParameters): Promise<Response>

Parameters

Returns

Promise<Response>