Address comments

This commit is contained in:
Yury Semikhatsky 2024-06-19 15:23:12 -07:00
parent 91552ae73b
commit 07b3d60efa
4 changed files with 18 additions and 8 deletions

View file

@ -126,6 +126,16 @@ Whether to ignore HTTPS errors when sending network requests.
Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is exceeded.
Defaults to `20`. Pass `0` to not follow redirects.
## method: RequestOptions.setMaxRetries
* since: v1.46
- returns: <[RequestOptions]>
### param: RequestOptions.setMaxRetries.maxRetries
* since: v1.46
- `maxRetries` <[int]>
Maximum number of times socket errors should be retried. Currently only `ECONNRESET` error is retried. An error will be thrown if the limit is exceeded. Defaults to `5`. Pass `0` to disable retries.
## method: RequestOptions.setMethod
* since: v1.18
- returns: <[RequestOptions]>

View file

@ -462,7 +462,7 @@ Defaults to `20`. Pass `0` to not follow redirects.
* langs: js, python, csharp
- `maxRetries` <[int]>
Maximum number of times socket errors should be retried. Currently only `ECONNRESET` error are retried. An error will be thrown if the limit is exceeded. Defaults to `5`. Pass `0` to disable retries.
Maximum number of times socket errors should be retried. Currently only `ECONNRESET` error is retried. An error will be thrown if the limit is exceeded. Defaults to `5`. Pass `0` to disable retries.
## evaluate-expression
- `expression` <[string]>

View file

@ -261,7 +261,7 @@ export abstract class APIRequestContext extends SdkObject {
// Retry on connection reset only.
if (e.code !== 'ECONNRESET')
throw e;
progress.log(`Received ECONNRESET, will retry after ${backoff}ms.`);
progress.log(` Received ECONNRESET, will retry after ${backoff}ms.`);
await new Promise(f => setTimeout(f, backoff));
backoff *= 2;
}

View file

@ -15964,7 +15964,7 @@ export interface APIRequestContext {
maxRedirects?: number;
/**
* Maximum number of times socket errors should be retried. Currently only `ECONNRESET` error are retried. An error
* Maximum number of times socket errors should be retried. Currently only `ECONNRESET` error is retried. An error
* will be thrown if the limit is exceeded. Defaults to `5`. Pass `0` to disable retries.
*/
maxRetries?: number;
@ -16070,7 +16070,7 @@ export interface APIRequestContext {
maxRedirects?: number;
/**
* Maximum number of times socket errors should be retried. Currently only `ECONNRESET` error are retried. An error
* Maximum number of times socket errors should be retried. Currently only `ECONNRESET` error is retried. An error
* will be thrown if the limit is exceeded. Defaults to `5`. Pass `0` to disable retries.
*/
maxRetries?: number;
@ -16156,7 +16156,7 @@ export interface APIRequestContext {
maxRedirects?: number;
/**
* Maximum number of times socket errors should be retried. Currently only `ECONNRESET` error are retried. An error
* Maximum number of times socket errors should be retried. Currently only `ECONNRESET` error is retried. An error
* will be thrown if the limit is exceeded. Defaults to `5`. Pass `0` to disable retries.
*/
maxRetries?: number;
@ -16242,7 +16242,7 @@ export interface APIRequestContext {
maxRedirects?: number;
/**
* Maximum number of times socket errors should be retried. Currently only `ECONNRESET` error are retried. An error
* Maximum number of times socket errors should be retried. Currently only `ECONNRESET` error is retried. An error
* will be thrown if the limit is exceeded. Defaults to `5`. Pass `0` to disable retries.
*/
maxRetries?: number;
@ -16370,7 +16370,7 @@ export interface APIRequestContext {
maxRedirects?: number;
/**
* Maximum number of times socket errors should be retried. Currently only `ECONNRESET` error are retried. An error
* Maximum number of times socket errors should be retried. Currently only `ECONNRESET` error is retried. An error
* will be thrown if the limit is exceeded. Defaults to `5`. Pass `0` to disable retries.
*/
maxRetries?: number;
@ -16456,7 +16456,7 @@ export interface APIRequestContext {
maxRedirects?: number;
/**
* Maximum number of times socket errors should be retried. Currently only `ECONNRESET` error are retried. An error
* Maximum number of times socket errors should be retried. Currently only `ECONNRESET` error is retried. An error
* will be thrown if the limit is exceeded. Defaults to `5`. Pass `0` to disable retries.
*/
maxRetries?: number;