isQueryFailure (db/query-failure.ts)

OpenBot · server/src/db/query-failure.ts · typescript · MIT
auth, Auth / Identity

Utility to safely extract error info from database query failures.

// Source: https://github.com/CopilotKit/OpenBot | License: MIT | Copyright 2026 CopilotKit
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * What a failed query may be quoted as, for every module that quotes one.
 *
 * WHY THIS IS ITS OWN FILE. These three used to be private to `plugins/store.ts`, which is where
 * the first leak was found and fixed. `credentials.ts` then wrote `error.message` into an audit row
 * on the rotation path — the one path whose bound values include the encrypted credential envelope
 * — and the docblock over that write asserted the secret had never left the function. Copying the
 * helper would have made two answers to one question, and importing the store from `credentials.ts`
 * is a cycle: the store already imports `../credentials`. A m

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key