(sql: string, params: readonly unknown[], cause: unknown)
| 47 | * parameters are baked into `message`, and the driver error hangs off `cause`. |
| 48 | */ |
| 49 | const drizzleQueryError = (sql: string, params: readonly unknown[], cause: unknown): Error => { |
| 50 | // oxlint-disable-next-line executor/no-error-constructor -- boundary: reconstructs the native driver error this module has to classify |
| 51 | const error = new Error(`Failed query: ${sql}\nparams: ${params.join(",")}`); |
| 52 | return Object.assign(error, { query: sql, params, cause }); |
| 53 | }; |
| 54 | |
| 55 | const SQL = 'select "key", "value" from "plugin_storage" where "scope_id" = $1 and "key" = $2'; |
| 56 | // Synthetic placeholders standing in for the real bound values (a WorkOS org id |
no outgoing calls
no test coverage detected