Revert "Merge branch 'make_e2e_tests_work_again' into 'main'"
This reverts commitd84b7e3d14, reversing changes made to394e66683a.
This commit is contained in:
@@ -38,8 +38,7 @@ export async function changeIdentity(identity: IPerson): Promise<void> {
|
|||||||
* the current identity used
|
* the current identity used
|
||||||
*/
|
*/
|
||||||
export async function initializeCurrentActor(
|
export async function initializeCurrentActor(
|
||||||
identities: IPerson[] | undefined,
|
identities: IPerson[] | undefined
|
||||||
rethrow = false
|
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const actorId = localStorage.getItem(AUTH_USER_ACTOR_ID);
|
const actorId = localStorage.getItem(AUTH_USER_ACTOR_ID);
|
||||||
console.debug("Initializing current actor", actorId);
|
console.debug("Initializing current actor", actorId);
|
||||||
@@ -63,10 +62,6 @@ export async function initializeCurrentActor(
|
|||||||
await changeIdentity(activeIdentity);
|
await changeIdentity(activeIdentity);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (rethrow) {
|
console.error("Failed to initialize current Actor", e);
|
||||||
throw e;
|
|
||||||
} else {
|
|
||||||
console.error("Failed to initialize current Actor", e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -239,13 +239,7 @@ const loginAction = async (e: Event) => {
|
|||||||
throw new Error("Loading user's identities failed");
|
throw new Error("Loading user's identities failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
// at some point this function was refactored to log errors rather than
|
await initializeCurrentActor(currentUserIdentitiesResult.loggedUser.actors);
|
||||||
// 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
|
|
||||||
);
|
|
||||||
|
|
||||||
// Step 3a following
|
// Step 3a following
|
||||||
const loggedUserLocationResult = await loggedUserLocationPromise;
|
const loggedUserLocationResult = await loggedUserLocationPromise;
|
||||||
|
|||||||
Reference in New Issue
Block a user