From 8b15a91049f115fa79362fc6155be5750d15dcab Mon Sep 17 00:00:00 2001 From: Amio Date: Sun, 9 Sep 2018 12:15:54 +0800 Subject: [PATCH] fix: recognize statusCode in gotErrorHandler --- libs/live-fetcher.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/live-fetcher.js b/libs/live-fetcher.js index 4a6ddf1..37b3ad5 100644 --- a/libs/live-fetcher.js +++ b/libs/live-fetcher.js @@ -33,9 +33,9 @@ const gotErrorHandler = (service, paramsPath, err) => { let status = 'unknown' if (err.code === 'ETIMEDOUT') { status = 'timeout' - } else if (err.statusCode === '404') { + } else if (err.statusCode === 404) { status = 'not found' - } else if (err.statusCode === '503') { + } else if (err.statusCode === 503) { status = 'unavailable' }