From 9ec31d94a0b09810c47a296fae63eae859bf603e Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Tue, 27 Aug 2024 15:08:13 +0300 Subject: [PATCH] Extend network error processing --- src/error-manager/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/error-manager/index.js b/src/error-manager/index.js index 976dc411..910e2fec 100644 --- a/src/error-manager/index.js +++ b/src/error-manager/index.js @@ -6,6 +6,10 @@ const cleanStack = require('clean-stack') const isDevEnv = process.env.NODE_ENV === 'development' +const { isENetError } = require( + '../../bfx-reports-framework/workers/loc.api/helpers/api-errors-testers' +) + const log = require('./log') const getErrorDescription = require('./get-error-description') const showModalDialog = require('./show-modal-dialog') @@ -216,8 +220,8 @@ const initLogger = () => { * - GitHub server can't respond to the auto-update requests */ if ( + isENetError(error) || /Cannot download differentially/gi.test(error) || - /ERR_CONNECTION_REFUSED/gi.test(error) || /objects\.githubusercontent\.com/gi.test(error) || /Error: ERR_FAILED \(-2\) loading 'file:.*\.html'/gi.test(error) || /Failed to generate PDF/gi.test(error)