MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / drizzleQueryError

Function drizzleQueryError

packages/core/sdk/src/fuma-runtime.test.ts:49–53  ·  view source on GitHub ↗
(sql: string, params: readonly unknown[], cause: unknown)

Source from the content-addressed store, hash-verified

47 * parameters are baked into `message`, and the driver error hangs off `cause`.
48 */
49const 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
55const 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

Callers 2

driverRejectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected