From ca0b9bca3360f5fcb7dd5c8c82a1b8305f6cca07 Mon Sep 17 00:00:00 2001 From: fengkx Date: Sun, 10 Mar 2019 09:37:15 +0800 Subject: [PATCH] format code --- lib/utils/axios.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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,