Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(notification): correct isDuplicateEntryError to only match dedup key

Richie McIlroycb235a3880a5
diff --git a/apps/web/lib/Notification.ts b/apps/web/lib/Notification.ts
index 55a576f6b..10f7c8572 100644
--- a/apps/web/lib/Notification.ts
+++ b/apps/web/lib/Notification.ts
@@ -48,7 +48,7 @@ const isDuplicateEntryError = (error: unknown) => {
return false;
const message =
`${duplicateEntryError.sqlMessage ?? ""} ${duplicateEntryError.message ?? ""}`.trim();
- return message.length === 0 || message.includes("dedup_key_idx");
+ return message.includes("dedup_key_idx");
};
export async function createNotification(