fix: don't suppress error when fetching user information

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2022-08-14 20:56:34 +02:00
parent 6e103a856e
commit 5e06e4ab3c

View file

@ -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<void> = 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
})
}
/**