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

Function onError

packages/platform/node-shared/src/NodeSocket.ts:259–265  ·  view source on GitHub ↗
(cause: Error)

Source from the content-addressed store, hash-verified

257 end(new Socket.SocketError({ reason: new Socket.SocketCloseError({ code: 1000 }) }))
258 }
259 function onError(cause: Error) {
260 close(
261 new Socket.SocketError({
262 reason: new Socket.SocketReadError({ cause })
263 })
264 )
265 }
266 function onClose(hadError: boolean) {
267 const err = new Socket.SocketError({
268 reason: new Socket.SocketCloseError({ code: hadError ? 1006 : 1000 })

Callers

nothing calls this directly

Calls 4

closeFunction · 0.70
cleanupFunction · 0.70
failMethod · 0.65
resumeFunction · 0.50

Tested by

no test coverage detected