Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

fix(core): update maxRetries docs (#31810)

Simon Knott2cc4e14756b9
diff --git a/docs/src/api/class-requestoptions.md b/docs/src/api/class-requestoptions.md
index 401e13d944..63aa1d6af3 100644
--- a/docs/src/api/class-requestoptions.md
+++ b/docs/src/api/class-requestoptions.md
@@ -134,7 +134,7 @@ Defaults to `20`. Pass `0` to not follow redirects.
* 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 `0` - no retries.
+Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
## method: RequestOptions.setMethod
* since: v1.18
diff --git a/docs/src/api/params.md b/docs/src/api/params.md
index d5d7edf89c..e974d13001 100644
--- a/docs/src/api/params.md
+++ b/docs/src/api/params.md
@@ -469,7 +469,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 is retried. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
+Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
## evaluate-expression
- `expression` <[string]>
diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.ts
index 3ba271f873..de0ecc6715 100644
--- a/packages/playwright-core/types/types.d.ts
+++ b/packages/playwright-core/types/types.d.ts
@@ -15934,8 +15934,8 @@ export interface APIRequestContext {
maxRedirects?: number;
/**
- * 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 `0` - no retries.
+ * Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
+ * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
*/
maxRetries?: number;
@@ -16040,8 +16040,8 @@ export interface APIRequestContext {
maxRedirects?: number;
/**
- * 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 `0` - no retries.
+ * Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
+ * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
*/
maxRetries?: number;
@@ -16126,8 +16126,8 @@ export interface APIRequestContext {
maxRedirects?: number;
/**
- * 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 `0` - no retries.
+ * Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
+ * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
*/
maxRetries?: number;
@@ -16212,8 +16212,8 @@ export interface APIRequestContext {
maxRedirects?: number;
/**
- * 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 `0` - no retries.
+ * Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
+ * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
*/
maxRetries?: number;
@@ -16340,8 +16340,8 @@ export interface APIRequestContext {
maxRedirects?: number;
/**
- * 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 `0` - no retries.
+ * Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
+ * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
*/
maxRetries?: number;
@@ -16426,8 +16426,8 @@ export interface APIRequestContext {
maxRedirects?: number;
/**
- * 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 `0` - no retries.
+ * Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
+ * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
*/
maxRetries?: number;