Skip to content

Commit

Permalink
[tests] Retry fetch upon "ECONNREFUSED" (vercel#5635)
Browse files Browse the repository at this point in the history
CI failed due to this error code, which can be retried.
  • Loading branch information
TooTallNate authored Jan 5, 2021
1 parent d9a298d commit 3cf155e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/lib/deployment/fetch-retry.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ async function fetchRetry(...args) {
// request to https://api-gru1.vercel.com/v3/now/deployments/dpl_FBWWhpQomjgwjJLu396snLrGZYCm failed, reason:
// connect ETIMEDOUT 18.228.143.224:443
throw canRetry(error);
} else if (error.code === 'ECONNREFUSED') {
// request to https://test2020-dhdy1xrfa.vercel.app/blog/post-3 failed, reason:
// connect ECONNREFUSED 76.76.21.21:443
throw canRetry(error);
} else if (error.code === 'ECONNRESET') {
throw canRetry(error);
}
Expand Down

0 comments on commit 3cf155e

Please sign in to comment.