From 49bd276bf73e997e2c888f4d0c981734491ae14d Mon Sep 17 00:00:00 2001 From: illia-prokopchuk <78905712+illia-prokopchuk@users.noreply.github.com> Date: Tue, 25 Jun 2024 11:01:10 +0300 Subject: [PATCH] Fix [UI] Useless "RETRY" click within the overlay notification (#2548) --- src/utils/notifications.util.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/notifications.util.js b/src/utils/notifications.util.js index 4966d78bf..589cdee6e 100644 --- a/src/utils/notifications.util.js +++ b/src/utils/notifications.util.js @@ -20,6 +20,7 @@ such restriction. import { setNotification } from '../reducers/notificationReducer' import { getErrorMsg } from 'igz-controls/utils/common.util' +import { FORBIDDEN_ERROR_STATUS_CODE } from 'igz-controls/constants' export const showErrorNotification = (dispatch, error, defaultErrorMsg, customErrorMsg, retryCallback) => { const notificationData = { @@ -29,7 +30,7 @@ export const showErrorNotification = (dispatch, error, defaultErrorMsg, customEr error } - if (retryCallback) { + if (retryCallback && error.response.status !== FORBIDDEN_ERROR_STATUS_CODE) { notificationData.retry = retryCallback }