mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-21 01:23:40 +00:00
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:
1 parent
2710de7446
commit
cbf07416cd
3 files changed
+26
-4
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user