diff --git a/lib/utils/axios.js b/lib/utils/axios.js index d7273135e..c77c4d481 100644 --- a/lib/utils/axios.js +++ b/lib/utils/axios.js @@ -27,7 +27,7 @@ if (config.proxy && config.proxy.protocol && typeof config.proxy.protocol === 's const custom = got.extend({ retry: { retries: config.requestRetry, - statusCodes: [408, 413, 429, 500, 502, 503, 504, 404] // add 404 to default for unit test + statusCodes: [408, 413, 429, 500, 502, 503, 504, 404], // add 404 to default for unit test }, hooks: { beforeRetry: [ @@ -51,10 +51,10 @@ const custom = got.extend({ }, ], onError: [ - error => { + (error) => { error.response.status = error.response.statusCode; return error; - } + }, ], }, agent: agent,