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