MCPcopy
hub / github.com/codedogQBY/ReadAny / isForeignKeyConstraintError

Function isForeignKeyConstraintError

packages/core/src/sync/simple-sync.ts:93–96  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

91}
92
93function isForeignKeyConstraintError(error: unknown): boolean {
94 const message = error instanceof Error ? error.message : String(error);
95 return message.includes("FOREIGN KEY constraint failed") || message.includes("(code: 787)");
96}
97
98function sleep(ms: number): Promise<void> {
99 return new Promise((resolve) => setTimeout(resolve, ms));

Callers 1

applyChangesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected