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

Method onFatal

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

Source from the content-addressed store, hash-verified

1783 }
1784
1785 onFatal(error: SqlError): void {
1786 if (this.done) return
1787 this.done = true
1788 const prepared = this.plan.prepared
1789 if (prepared !== undefined) prepared.parsing = false
1790 if (this.aborted) this.drainDone?.()
1791 else this.finish(Effect.fail(this.failure ?? error))
1792 }
1793
1794 onDecodeFailure(error: SqlError): void {
1795 if (this.done || this.aborted || this.phase === "drain") return

Callers 2

failDesyncMethod · 0.95
fatalMethod · 0.80

Calls 2

failMethod · 0.65
finishMethod · 0.45

Tested by

no test coverage detected