Function executeWithRetry
- executeWithRetry<T>(execCallback: ((requestId: string) => Promise<T>), errorCallback?: ((error: any, requestId: string, isFinal: boolean) => void), opts?: RetryTolerance): Promise<T & {
requestId: string;
} | RejectedNodePromises & {
requestId: string;
}>
-
Parameters
-
execCallback: ((requestId: string) => Promise<T>)
-
- (requestId: string): Promise<T>
-
Returns Promise<T>
-
Optional
errorCallback: ((error: any, requestId: string, isFinal: boolean) => void)
-
- (error: any, requestId: string, isFinal: boolean): void
-
Parameters
-
error: any
-
requestId: string
-
isFinal: boolean
Returns void
-
Returns Promise<T & {
requestId: string;
} | RejectedNodePromises & {
requestId: string;
}>
Allows for invoking a callback and re exucting while re generating a new request identifier
Returns