From 5e06e4ab3cb8eff5ef79e0a9c668ca5b101f4859 Mon Sep 17 00:00:00 2001 From: Tilman Vatteroth Date: Sun, 14 Aug 2022 20:56:34 +0200 Subject: [PATCH] fix: don't suppress error when fetching user information Signed-off-by: Tilman Vatteroth --- src/components/login-page/auth/utils.ts | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/components/login-page/auth/utils.ts b/src/components/login-page/auth/utils.ts index 75c4ebff4..ed7844ca6 100644 --- a/src/components/login-page/auth/utils.ts +++ b/src/components/login-page/auth/utils.ts @@ -13,18 +13,14 @@ import { authProviderTypeOneClick } from '../../../api/config/types' * Fetches metadata about the currently signed-in user from the API and stores it into the redux. */ export const fetchAndSetUser: () => Promise = async () => { - try { - const me = await getMe() - setUser({ - username: me.username, - displayName: me.displayName, - photo: me.photo, - authProvider: me.authProvider, - email: me.email - }) - } catch (error) { - console.error(error) - } + const me = await getMe() + setUser({ + username: me.username, + displayName: me.displayName, + photo: me.photo, + authProvider: me.authProvider, + email: me.email + }) } /**