MCPcopy Index your code
hub / github.com/Effect-TS/effect / onError

Method onError

packages/sql-pg/src/PgClient.ts:140–143  ·  view source on GitHub ↗
(cause: Error)

Source from the content-addressed store, hash-verified

138 let cancel: Effect.Effect<void> | undefined = undefined
139 let client: Pg.PoolClient | undefined = undefined
140 function onError(cause: Error) {
141 cleanup(cause)
142 resume(Effect.fail(new SqlError({ cause, message: "Connection error" })))
143 }
144 function cleanup(cause?: Error) {
145 if (!done) client?.release(cause)
146 done = true

Callers 14

onErrorFunction · 0.80
spawnFunction · 0.80
RpcClient.tsFile · 0.80
Micro.test.tsFile · 0.80
fiberRuntime.tsFile · 0.80
fromAcquireFunction · 0.80
asyncScopedFunction · 0.80
RunnerServer.tsFile · 0.80
execWithLockConnFunction · 0.80

Calls 3

cleanupFunction · 0.85
failMethod · 0.65
resumeFunction · 0.50

Tested by

no test coverage detected