(cause: unknown)
| 904 | const ATTR_SERVER_PORT = "server.port" |
| 905 | |
| 906 | const pgCodeFromCause = (cause: unknown): string | undefined => { |
| 907 | if (typeof cause !== "object" || cause === null || !("code" in cause)) { |
| 908 | return undefined |
| 909 | } |
| 910 | const code = cause.code |
| 911 | return typeof code === "string" ? code : undefined |
| 912 | } |
| 913 | |
| 914 | const pgConstraintFromCause = (cause: unknown): string => { |
| 915 | if (typeof cause !== "object" || cause === null || !("constraint" in cause)) { |