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

Function invalid

packages/effect/src/graphql/GraphQLProtocol.ts:824–830  ·  view source on GitHub ↗
(reason: string, cause?: unknown)

Source from the content-addressed store, hash-verified

822 // An invalid server message closes the connection with 4400, which is
823 // fatal for every operation on it.
824 const invalid = (reason: string, cause?: unknown) =>
825 Effect.andThen(
826 Effect.ignore(writer.write(new Socket.CloseEvent(4400, "Invalid message"))),
827 Effect.fail(
828 new TransportError({ description: `Invalid graphql-ws message: ${reason}`, closeCode: 4400, cause })
829 )
830 )
831
832 const handle = (conn: Connection, frame: string | Uint8Array): Effect.Effect<void, TransportError> => {
833 // Any frame answers a keep-alive ping; an invalid one drops the connection anyway.

Callers 1

handleFunction · 0.70

Calls 2

writeMethod · 0.65
failMethod · 0.65

Tested by

no test coverage detected