mirror of
https://github.com/nick-fields/retry.git
synced 2026-02-10 15:15:30 +00:00
major: bump to v2 and added lots of examples
This commit is contained in:
6
dist/index.js
vendored
6
dist/index.js
vendored
@@ -533,11 +533,11 @@ async function runAction() {
|
||||
} catch (error) {
|
||||
if (attempt === MAX_ATTEMPTS) {
|
||||
throw new Error(`Final attempt failed. ${error.message}`);
|
||||
} else if (!done && RETRY_ON == 'nonzero') {
|
||||
} else if (!done && RETRY_ON === 'error') {
|
||||
// error: timeout
|
||||
throw error;
|
||||
} else if (exit > 0 && RETRY_ON == 'timeout') {
|
||||
// error: nonzero
|
||||
} else if (exit > 0 && RETRY_ON === 'timeout') {
|
||||
// error: error
|
||||
throw error;
|
||||
} else {
|
||||
warning(`Attempt ${attempt} failed. Reason: ${error.message}`);
|
||||
|
||||
Reference in New Issue
Block a user