From 01e2e09fa5de65d9b6d9ee2838454b6bbb65d4b2 Mon Sep 17 00:00:00 2001 From: tophf Date: Sun, 28 Feb 2021 08:37:56 +0300 Subject: [PATCH] ignore HTTP502 error when syncing --- background/sync-manager.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/background/sync-manager.js b/background/sync-manager.js index d37df6c5..e5656df2 100644 --- a/background/sync-manager.js +++ b/background/sync-manager.js @@ -208,7 +208,10 @@ const syncMan = (() => { } function isNetworkError(err) { - return err.name === 'TypeError' && /networkerror|failed to fetch/i.test(err.message); + return ( + err.name === 'TypeError' && /networkerror|failed to fetch/i.test(err.message) || + err.code === 502 + ); } function isGrantError(err) {