Skip to content

Commit

Permalink
feat: ✨ serialize meeting input
Browse files Browse the repository at this point in the history
  • Loading branch information
MinhxNguyen7 committed Jun 3, 2024
1 parent a6d2e9f commit e757fca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/db/databaseUtils.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@ export const insertMeeting = async (meeting: MeetingInsertSchema, meetingDates:
try {
[dbMeeting] = await db.insert(meetings).values(meeting).returning();
} catch (err) {
console.error("Error inserting meeting=", meeting);
throw Error(`Error inserting meeting=${meeting}`);
const meetingSerialized = JSON.stringify(meeting);
console.error("Error inserting meeting=", meetingSerialized);
throw Error(`Error inserting meeting=${meetingSerialized}`);
}

await insertMeetingDates(meetingDates, dbMeeting.id);
Expand Down

0 comments on commit e757fca

Please sign in to comment.