diff --git a/src/utils.js b/src/utils.js index 0d3a2b8..aa22dc6 100644 --- a/src/utils.js +++ b/src/utils.js @@ -258,7 +258,14 @@ export function myFetch({ }) .catch((error) => { // ignore errors here as they are handled in the components - if (error === 400 || error === 401) throw error; + if (error === 400) throw error; + + if (error === 401) { + handleLogout({ + setUserSession: setUserSessionToLocalStorage, + }); + return; + } // show error notification for all other errors