From 606628c43a04e97d40d5efa31979284405a264cd Mon Sep 17 00:00:00 2001 From: David Chen Date: Sun, 22 Sep 2024 13:26:40 -0400 Subject: [PATCH] Display new meeting booking errors --- src/comps/pages/orgs/admin/AdminUpsertMeeting.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/comps/pages/orgs/admin/AdminUpsertMeeting.tsx b/src/comps/pages/orgs/admin/AdminUpsertMeeting.tsx index 5da9fb5..3ec95b8 100644 --- a/src/comps/pages/orgs/admin/AdminUpsertMeeting.tsx +++ b/src/comps/pages/orgs/admin/AdminUpsertMeeting.tsx @@ -246,10 +246,14 @@ const AdminUpsertMeeting = ({ }); } if (supabaseReturn.error) { - enqueueSnackbar( - "Error creating meeting. Contact it@stuysu.org for support.", - { variant: "error" }, - ); + const error = await supabaseReturn.error?.context.text(); + let message = "Contact it@stuysu.org for support."; + if (error) { + message = error; + } + enqueueSnackbar("Error creating meeting. " + message, { + variant: "error", + }); return; }