From e3d0ad385852deac84740556f7e7e33b457da0cd Mon Sep 17 00:00:00 2001 From: maria-hambardzumian Date: Fri, 21 Jun 2024 01:56:15 +0400 Subject: [PATCH] EPMRPP-91264 || Extra request for 'locations' is sent in debug mode --- app/src/controllers/log/sagas.js | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/app/src/controllers/log/sagas.js b/app/src/controllers/log/sagas.js index 3891273247..935e5d99cd 100644 --- a/app/src/controllers/log/sagas.js +++ b/app/src/controllers/log/sagas.js @@ -137,20 +137,23 @@ function* fetchAllErrorLogs({ if (logViewMode === DETAILED_LOG_VIEW) { retryId = yield select(activeRetryIdSelector); } + const isDebugMode = yield select(debugModeSelector); let cancelRequest = () => {}; try { - yield put( - fetchDataAction(namespace)( - URLS.errorLogs(activeProject, retryId || id, level || filterLevel), - { - params: { ...query, excludeLogContent }, - abort: (cancelFunc) => { - cancelRequest = cancelFunc; + if (!isDebugMode) { + yield put( + fetchDataAction(namespace)( + URLS.errorLogs(activeProject, retryId || id, level || filterLevel), + { + params: { ...query, excludeLogContent }, + abort: (cancelFunc) => { + cancelRequest = cancelFunc; + }, }, - }, - ), - ); - yield take(createFetchPredicate(namespace)); + ), + ); + yield take(createFetchPredicate(namespace)); + } } catch (err) { yield handleError(err); } finally {