From 3cf155e999f9d3795dafa8b51fc43f160b57309f Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Mon, 4 Jan 2021 16:06:28 -0800 Subject: [PATCH] [tests] Retry fetch upon "ECONNREFUSED" (#5635) CI failed due to this error code, which can be retried. --- test/lib/deployment/fetch-retry.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/lib/deployment/fetch-retry.js b/test/lib/deployment/fetch-retry.js index 562bd724e9b4..012961f13a0f 100644 --- a/test/lib/deployment/fetch-retry.js +++ b/test/lib/deployment/fetch-retry.js @@ -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); }