MCPcopy Create free account
hub / github.com/effect-app/libs / sqlErrorMessage

Function sqlErrorMessage

packages/infra/src/Store/SQL.ts:21–21  ·  view source on GitHub ↗
(e: unknown)

Source from the content-addressed store, hash-verified

19import { makeETag } from "./utils.ts"
20
21const sqlErrorMessage = (e: unknown) => (e as any)?.message ? String((e as any).message) : String(e)
22const sqlIsTransient = (e: unknown) =>
23 /timeout|ETIMEDOUT|ECONNRESET|ECONNREFUSED|connection|deadlock|too many connections/i.test(sqlErrorMessage(e))
24// Map a SqlError into a typed, serializable DatabaseError (instead of `.orDie`,

Callers 2

sqlIsTransientFunction · 0.85
toDatabaseErrorFunction · 0.85

Calls 1

StringInterface · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…