@authhero/kysely-adapter 11.8.5 → 11.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -898,7 +898,8 @@ function Ye(e) {
898
898
  try {
899
899
  await e.insertInto("tenants").values(i).execute();
900
900
  } catch (e) {
901
- throw e?.message?.includes("UNIQUE constraint failed") || e?.message?.includes("duplicate key") || e?.code === "SQLITE_CONSTRAINT" || e?.code === "ER_DUP_ENTRY" || e?.code === "23505" ? new D(409, { message: `Tenant with ID '${r.id}' already exists` }) : e;
901
+ let t = e?.message ?? "";
902
+ throw t.includes("UNIQUE constraint failed") || t.includes("Duplicate entry") || t.includes("duplicate key") || t.includes("AlreadyExists") || e?.code === "SQLITE_CONSTRAINT" || e?.code === "SQLITE_CONSTRAINT_UNIQUE" || e?.code === "SQLITE_CONSTRAINT_PRIMARYKEY" || e?.code === "ER_DUP_ENTRY" || e?.code === "23505" ? new D(409, { message: `Tenant with ID '${r.id}' already exists` }) : e;
902
903
  }
903
904
  return r;
904
905
  };