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

Function errorResponse

packages/sql/pg/test/PgConnection.in-process.test.ts:173–180  ·  view source on GitHub ↗
(fields: ReadonlyArray<readonly [string, string]>)

Source from the content-addressed store, hash-verified

171}
172
173const errorResponse = (fields: ReadonlyArray<readonly [string, string]>): Buffer =>
174 backendMessage(
175 "E",
176 Buffer.concat([
177 ...fields.map(([code, value]) => Buffer.from(`${code}${value}\0`)),
178 Buffer.from([0])
179 ])
180 )
181
182const withTcpServer = (
183 onConnection: (socket: Net.Socket) => void

Callers 1

Calls 3

fromMethod · 0.80
backendMessageFunction · 0.70
mapMethod · 0.45

Tested by

no test coverage detected