From 8e616febfcd3d8e923b659f2b3eae3cf9aa7c639 Mon Sep 17 00:00:00 2001 From: Henri Nieminen Date: Thu, 19 Sep 2024 11:26:38 +0300 Subject: [PATCH] discard known HANDLING_LOGIN_CALLBACK error in hds-react --- src/auth/components/CallbackPage.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/auth/components/CallbackPage.tsx b/src/auth/components/CallbackPage.tsx index 222e374f..180146b0 100644 --- a/src/auth/components/CallbackPage.tsx +++ b/src/auth/components/CallbackPage.tsx @@ -15,6 +15,11 @@ const CallbackPage = (props: Props) => { history.push(getRedirectUrlFromSessionStorage() || getRouteById(Routes.LEASES)); }; const onError = (error: OidcClientError) => { + // "HANDLING_LOGIN_CALLBACK cannot be handled by a callback" is a known error in HDS + // https://hds.hel.fi/components/login/api/#logincallbackhandler + if (error.message === "Current state (HANDLING_LOGIN_CALLBACK) cannot be handled by a callback") { + return; + } console.error("Login Callback Error:", error); };