From 6b9a82be8d59508134842191b705786efedd33bd Mon Sep 17 00:00:00 2001 From: Stephen Smith Date: Thu, 19 Jan 2023 14:46:45 -0500 Subject: [PATCH] 19715: Preserve current url when api returns auth error Arvados-DCO-1.1-Signed-off-by: Stephen Smith --- src/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index c2142282..244d1387 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -132,7 +132,8 @@ fetchConfig() if (error.status === 404) { store.dispatch(openNotFoundDialog()); } else if (error.status === 401 && error.errors[0].indexOf("Not logged in") > -1) { - store.dispatch(logout()); + // Catch auth errors when navigating and redirect to login preserving url location + store.dispatch(logout(false, true)); } else { store.dispatch(snackbarActions.OPEN_SNACKBAR({ message: `${error.errors -- 2.30.2