From 01d912d153c347c3b676dafa17d415665f6d0d32 Mon Sep 17 00:00:00 2001 From: daniele-mng Date: Fri, 6 Sep 2024 14:42:03 +0200 Subject: [PATCH] fix-CI-step--upload-coverage --- src/web/store/usersettings/actions.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/web/store/usersettings/actions.js b/src/web/store/usersettings/actions.js index c046627fd6..9325b77f0e 100644 --- a/src/web/store/usersettings/actions.js +++ b/src/web/store/usersettings/actions.js @@ -52,11 +52,14 @@ export const setIsLoggedIn = isLoggedIn => ({ isLoggedIn: isLoggedIn === true, }); -export const renewSessionTimeout = gmp => () => dispatch => - gmp.user - .renewSession() - .then(response => dispatch(setSessionTimeout(response.data))); - +export const renewSessionTimeout = gmp => () => async dispatch => { + try { + const response = await gmp.user.renewSession(); + dispatch(setSessionTimeout(response.data)); + } catch (error) { + console.error('Error renewing session:', error); + } +}; export const updateTimezone = gmp => timezone => dispatch => { gmp.setTimezone(timezone); return Promise.resolve(dispatch(setTimezone(timezone)));