Skip to content
Snippets Groups Projects
Commit 7e8239dd authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix(github): better request error handling

parent 301678bd
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment