From 26efdf2407699734355c7e148acb7d1872b585f1 Mon Sep 17 00:00:00 2001 From: Minh Nguyen <64875104+MinhxNguyen7@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:43:58 -0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20more=20descriptive=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/db/databaseUtils.server.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/db/databaseUtils.server.ts b/src/lib/db/databaseUtils.server.ts index fb1e94e..f155499 100644 --- a/src/lib/db/databaseUtils.server.ts +++ b/src/lib/db/databaseUtils.server.ts @@ -120,8 +120,10 @@ export const insertMeeting = async (meeting: MeetingInsertSchema, meetingDates: [dbMeeting] = await db.insert(meetings).values(meeting).returning(); } catch (err) { const meetingSerialized = JSON.stringify(meeting); - console.error("Error inserting meeting=", meetingSerialized); - throw Error(`Error inserting meeting=${meetingSerialized}`); + const message = `Error creating meeting(${meetingSerialized}): ${err.message}`; + + console.error(message); + throw Error(message); } await insertMeetingDates(meetingDates, dbMeeting.id);