From a9cfcd9e9d701edfebb8b71fdcb668e2df400286 Mon Sep 17 00:00:00 2001 From: Massedil Date: Mon, 26 May 2025 18:39:16 +0200 Subject: [PATCH] Revert "Merge branch 'make_e2e_tests_work_again' into 'main'" This reverts commit d84b7e3d146b3b7b2c2135ed4e23443bd480a36b, reversing changes made to 394e66683a9dfd91848018f0e30be7c00255af18. --- src/utils/identity.ts | 9 ++------- src/views/User/LoginView.vue | 8 +------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/utils/identity.ts b/src/utils/identity.ts index 3b741793f..665e6d070 100644 --- a/src/utils/identity.ts +++ b/src/utils/identity.ts @@ -38,8 +38,7 @@ export async function changeIdentity(identity: IPerson): Promise { * the current identity used */ export async function initializeCurrentActor( - identities: IPerson[] | undefined, - rethrow = false + identities: IPerson[] | undefined ): Promise { const actorId = localStorage.getItem(AUTH_USER_ACTOR_ID); console.debug("Initializing current actor", actorId); @@ -63,10 +62,6 @@ export async function initializeCurrentActor( await changeIdentity(activeIdentity); } } catch (e) { - if (rethrow) { - throw e; - } else { - console.error("Failed to initialize current Actor", e); - } + console.error("Failed to initialize current Actor", e); } } diff --git a/src/views/User/LoginView.vue b/src/views/User/LoginView.vue index 146a7b8f3..72e12faad 100644 --- a/src/views/User/LoginView.vue +++ b/src/views/User/LoginView.vue @@ -239,13 +239,7 @@ const loginAction = async (e: Event) => { throw new Error("Loading user's identities failed"); } - // at some point this function was refactored to log errors rather than - // throwing them, which made the catch below useless. The second argument - // specifies that errors should be thrown instead of logged - await initializeCurrentActor( - currentUserIdentitiesResult.loggedUser.actors, - true - ); + await initializeCurrentActor(currentUserIdentitiesResult.loggedUser.actors); // Step 3a following const loggedUserLocationResult = await loggedUserLocationPromise;