MCPcopy Create free account
hub / github.com/Effect-TS/effect / onFatal

Function onFatal

packages/sql/pg/src/PgConnection.ts:2139–2146  ·  view source on GitHub ↗
(error: SqlError)

Source from the content-addressed store, hash-verified

2137 }
2138
2139 const onFatal = (error: SqlError): void => {
2140 if (done) return
2141 done = true
2142 finished = true
2143 if (failure === undefined) failure = error
2144 drainDone?.()
2145 deliver()
2146 }
2147 // `conn.fatal` notifies the registered consumer; the direct `onFatal` call
2148 // covers the case where the connection was already dead.
2149 const failFatal = (error: SqlError): void => {

Callers 1

failFatalFunction · 0.85

Calls 1

deliverFunction · 0.70

Tested by

no test coverage detected