From 52d53fb78aac369af485de9018298434f0edfd2d Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Thu, 8 Oct 2026 14:45:19 -0400 Subject: [PATCH] InviteList: load() keeps its own error line; revoke toasts ebbe4a6 converted the wrong try block in InviteList: the edit matched from load()'s try down to revoke()'s catch, which left load() half-converted. load() goes back to its own try/catch/finally. revoke() uses toastOnFailure, as intended. Co-Authored-By: Claude Opus 5.5 --- frontend/src/components/InviteList.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/InviteList.vue b/frontend/src/components/InviteList.vue index f5a95b9..3c4e232 100644 --- a/frontend/src/components/InviteList.vue +++ b/frontend/src/components/InviteList.vue @@ -29,7 +29,6 @@ const LIFETIMES = [ { days: 30, label: "30 days" }, ]; - const invites = ref([]); const loading = ref(true); const error = ref(""); @@ -41,7 +40,7 @@ const freshLink = ref(""); async function load() { error.value = ""; - await toastOnFailure(async () => { + try { invites.value = (await api.get<{ invites: Invite[] }>("/api/invites")).invites; } catch (e) { error.value = errorMessage(e, "Couldn't load invites."); @@ -71,7 +70,7 @@ async function create() { async function revoke(invite: Invite) { if (!window.confirm(`Revoke the invite for ${who(invite)}? Its link will stop working.`)) return; - try { + await toastOnFailure(async () => { const updated = await api.del(`/api/invites/${invite.id}`); invites.value = invites.value.map((i) => (i.id === updated.id ? updated : i)); }, "Couldn't revoke that invite.");