MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / rejectInvalidFrame

Function rejectInvalidFrame

src/utils/ndjsonFramer.ts:47–54  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

45 }
46
47 const rejectInvalidFrame = (error: unknown): void => {
48 const frameError =
49 error instanceof Error ? error : new Error('Invalid NDJSON frame')
50 options.onInvalidFrame?.(frameError)
51 if (options.destroyOnInvalidFrame ?? false) {
52 socket.destroy(frameError)
53 }
54 }
55
56 const emitLine = (line: string): void => {
57 if (!line.trim()) return

Callers 1

emitLineFunction · 0.85

Calls 1

destroyMethod · 0.45

Tested by

no test coverage detected