Skip to content

Commit 50060ab

Browse files
DavertMikclaude
andcommitted
Remove user-facing when option from retryFailedStep config
The internal retry predicate (config.when) is still set for the recorder; only the configurable customWhen hook is removed. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 6fdab88 commit 50060ab

2 files changed

Lines changed: 0 additions & 4 deletions

File tree

docs/plugins/retryFailedStep.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ Run tests with plugin enabled:
2929
#### Configuration:
3030

3131
* `retries` - number of retries (by default 3),
32-
* `when` - function, when to perform a retry (accepts error as parameter)
3332
* `factor` - The exponential factor to use. Default is 1.5.
3433
* `minTimeout` - The number of milliseconds before starting the first retry. Default is 150.
3534
* `maxTimeout` - The maximum number of milliseconds between two retries. Default is 10000.

lib/plugin/retryFailedStep.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ const RETRY_PRIORITIES = {
4747
* #### Configuration:
4848
*
4949
* * `retries` - number of retries (by default 3),
50-
* * `when` - function, when to perform a retry (accepts error as parameter)
5150
* * `factor` - The exponential factor to use. Default is 1.5.
5251
* * `minTimeout` - The number of milliseconds before starting the first retry. Default is 150.
5352
* * `maxTimeout` - The maximum number of milliseconds between two retries. Default is 10000.
@@ -94,7 +93,6 @@ const RETRY_PRIORITIES = {
9493
export default function (config) {
9594
config = Object.assign({}, defaultConfig, config)
9695
config.ignoredSteps = config.ignoredSteps.concat(config.defaultIgnoredSteps)
97-
const customWhen = config.when
9896

9997
let enableRetry = false
10098

@@ -104,7 +102,6 @@ export default function (config) {
104102
if (!store.autoRetries) return false
105103
if (err && err.isTerminal) return false
106104
if (err && err.message && (err.message.includes('ERR_ABORTED') || err.message.includes('frame was detached') || err.message.includes('Target page, context or browser has been closed'))) return false
107-
if (customWhen) return customWhen(err)
108105
return true
109106
}
110107
config.when = when

0 commit comments

Comments
 (0)