MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / createPostgresError

Function createPostgresError

common/src/testing/errors.ts:22–33  ·  view source on GitHub ↗
(
  message: string,
  code: string,
  constraint?: string,
)

Source from the content-addressed store, hash-verified

20}
21
22export const createPostgresError = (
23 message: string,
24 code: string,
25 constraint?: string,
26): PostgresError => {
27 const error = new Error(message) as PostgresError
28 error.code = code
29 if (constraint !== undefined) {
30 error.constraint = constraint
31 }
32 return error
33}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected