MCPcopy
hub / github.com/claude-code-best/claude-code / rejectOversizedFrame

Function rejectOversizedFrame

src/utils/ndjsonFramer.ts:37–45  ·  view source on GitHub ↗
(bytes: number)

Source from the content-addressed store, hash-verified

35 const maxFrameBytes = options.maxFrameBytes ?? Number.POSITIVE_INFINITY
36
37 const rejectOversizedFrame = (bytes: number): void => {
38 const error = new Error(
39 `NDJSON frame exceeded ${maxFrameBytes} bytes (${bytes})`,
40 )
41 options.onFrameError?.(error)
42 if (options.destroyOnFrameError ?? true) {
43 socket.destroy(error)
44 }
45 }
46
47 const rejectInvalidFrame = (error: unknown): void => {
48 const frameError =

Callers 1

attachNdjsonFramerFunction · 0.85

Calls 1

destroyMethod · 0.45

Tested by

no test coverage detected