From 48c4dae218d318d136d5743efcd39db29073c5fa Mon Sep 17 00:00:00 2001 From: gunshiz Date: Sat, 4 Jul 2026 01:09:05 +0700 Subject: [PATCH] fix: handle unauthorized guild roles by defaulting to an empty array --- app/actions/discord.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/actions/discord.ts b/app/actions/discord.ts index aa339ae..035658f 100644 --- a/app/actions/discord.ts +++ b/app/actions/discord.ts @@ -73,7 +73,7 @@ export async function getDiscordMemberProfile(discordId: string) { headers: { Authorization: `Bot ${token}` }, cache: "no-store", }), - getGuildRoles() + getGuildRoles().catch(() => []) // Fallback to empty array if unauthorized ]); if (!memberRes.ok) return null;