Interface RetryConfig (6.5.0)

Configuration for the Gaxios request method.

Package

gaxios

Properties

currentRetryAttempt

  currentRetryAttempt 
 ?: 
  
 number 
 ; 
 

The number of retries already attempted.

httpMethodsToRetry

  httpMethodsToRetry 
 ?: 
  
 string 
 []; 
 

The HTTP Methods that will be automatically retried. Defaults to ['GET','PUT','HEAD','OPTIONS','DELETE']

noResponseRetries

  noResponseRetries 
 ?: 
  
 number 
 ; 
 

When there is no response, the number of retries to attempt. Defaults to 2.

onRetryAttempt

  onRetryAttempt 
 ?: 
  
 ( 
 err 
 : 
  
 GaxiosError 
 ) 
  
 = 
>  
 Promise<void> 
  
 | 
  
 void 
 ; 
 

Function to invoke when a retry attempt is made.

retry

  retry 
 ?: 
  
 number 
 ; 
 

The number of times to retry the request. Defaults to 3.

retryBackoff

  retryBackoff 
 ?: 
  
 ( 
 err 
 : 
  
 GaxiosError 
 , 
  
 defaultBackoffMs 
 : 
  
 number 
 ) 
  
 = 
>  
 Promise<void> 
 ; 
 

Function to invoke which returns a promise. After the promise resolves, the retry will be triggered. If provided, this will be used in-place of the retryDelay

retryDelay

  retryDelay 
 ?: 
  
 number 
 ; 
 

The amount of time to initially delay the retry, in ms. Defaults to 100ms.

shouldRetry

  shouldRetry 
 ?: 
  
 ( 
 err 
 : 
  
 GaxiosError 
 ) 
  
 = 
>  
 Promise<boolean> 
  
 | 
  
 boolean 
 ; 
 

Function to invoke which determines if you should retry

statusCodesToRetry

  statusCodesToRetry 
 ?: 
  
 number 
 [][]; 
 

The HTTP response status codes that will automatically be retried. Defaults to: [[100, 199], [408, 408], [429, 429], [500, 599]]

Design a Mobile Site
View Site in Mobile | Classic
Share by: