MCPcopy Index your code
hub / github.com/simstudioai/sim / getPostgresConstraintName

Function getPostgresConstraintName

packages/utils/src/errors.ts:38–40  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

36 * `postgres` / `pg` drivers, walking `cause` chains the same way as `getPostgresErrorCode`.
37 */
38export function getPostgresConstraintName(error: unknown): string | undefined {
39 return readPgErrorField(error, 'constraint_name') ?? readPgErrorField(error, 'constraint')
40}
41
42export interface DescribedError {
43 name: string

Callers 6

trackChatUploadFunction · 0.90
updateCostInnerFunction · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90

Calls 1

readPgErrorFieldFunction · 0.85

Tested by

no test coverage detected