sendou.ink/app/utils/sql.ts
Kalle 83d21879bf
Some checks are pending
E2E Tests / e2e (push) Waiting to run
Tests and checks on push / run-checks-and-tests (push) Waiting to run
Updates translation progress / update-translation-progress-issue (push) Waiting to run
Migrate various tournament queries to Kysely (#3135)
2026-06-03 21:05:42 +03:00

18 lines
390 B
TypeScript

export function errorIsSqliteForeignKeyConstraintFailure(
error: unknown,
): error is Error {
return (
error instanceof Error &&
error?.message?.includes("FOREIGN KEY constraint failed")
);
}
export function errorIsSqliteUniqueConstraintFailure(
error: unknown,
): error is Error {
return (
error instanceof Error &&
error?.message?.includes("UNIQUE constraint failed")
);
}