From 7e8239dd65f413baba643a6efce0fa56df3380f1 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Tue, 9 Nov 2021 05:16:06 +0100 Subject: [PATCH] fix(github): better request error handling --- lib/util/http/github.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/util/http/github.ts b/lib/util/http/github.ts index bdfd2f6f72..7674405713 100644 --- a/lib/util/http/github.ts +++ b/lib/util/http/github.ts @@ -55,11 +55,10 @@ function handleGotError( message = String(err.response.body.message); } if ( - err.name === 'RequestError' && - (err.code === 'ENOTFOUND' || - err.code === 'ETIMEDOUT' || - err.code === 'EAI_AGAIN' || - err.code === 'ECONNRESET') + err.code === 'ENOTFOUND' || + err.code === 'ETIMEDOUT' || + err.code === 'EAI_AGAIN' || + err.code === 'ECONNRESET' ) { logger.debug({ err }, 'GitHub failure: RequestError'); throw new ExternalHostError(err, PlatformId.Github); -- GitLab