fix(console): show invite loading failures

Failed invite loads must not look like no pending invites.
Show the error and discard responses from a previously shown group.
This commit is contained in:
翅膀 committed 2026-10-23 23:23:54 +08:00
1 parent 2710de7446
commit cbf07416cd
3 files changed
+26 -4

No files matched your search

+2 -1
View File
@@ -21,6 +21,7 @@ export function useInvitesApi() {
}
}
/** Throws when the list cannot be read: never shown as "no invites". */
async function list(groupId: string): Promise<GroupInvite[]> {
loading.value = true;
error.value = "";
@@ -31,7 +32,7 @@ export function useInvitesApi() {
return data.invites ?? [];
} catch (err) {
error.value = err instanceof Error ? err.message : String(err);
return [];
throw err;
} finally {
loading.value = false;
}