{"record":{"id":"80c834ce4eeebd3e","repo":"earendil-works/pi","slug":"invalid-this-kind-protocol-framing-boundeder","errorCode":null,"errorMessage":"Invalid ${this.kind} protocol framing: ${boundedErrorMessage(error)}","messagePattern":"Invalid (.+?) protocol framing: (.+?)","errorType":"exception","errorClass":"ProtocolValidationError","httpStatus":null,"severity":"error","filePath":"packages/protocol/src/codec.ts","lineNumber":123,"sourceCode":"\t\t\tconst messages: T[] = [];\n\t\t\tfor (const frame of this.frames.push(chunk)) {\n\t\t\t\tmessages.push(this.parse(decodeCbor(frame, { maxByteLength: this.maxFrameLength })));\n\t\t\t}\n\t\t\treturn messages;\n\t\t} catch (error) {\n\t\t\tthis.failed = true;\n\t\t\tif (error instanceof ProtocolValidationError) throw error;\n\t\t\tthrow new ProtocolValidationError(`Invalid ${this.kind} protocol frame: ${boundedErrorMessage(error)}`);\n\t\t}\n\t}\n\n\tend(): void {\n\t\tif (this.failed) throw new ProtocolValidationError(`${this.kind} message decoder has failed`);\n\t\ttry {\n\t\t\tthis.frames.end();\n\t\t} catch (error) {\n\t\t\tthis.failed = true;\n\t\t\tthrow new ProtocolValidationError(`Invalid ${this.kind} protocol framing: ${boundedErrorMessage(error)}`);\n\t\t}\n\t}\n}\n\n/** Incrementally decodes and validates framed client messages. */\nexport class ClientMessageDecoder {\n\tprivate readonly decoder: ValidatedMessageDecoder<ClientMessage>;\n\n\tconstructor(options?: FrameDecoderOptions) {\n\t\tthis.decoder = new ValidatedMessageDecoder(\"client\", parseClientMessage, options);\n\t}\n\n\tpush(chunk: Uint8Array): ClientMessage[] {\n\t\treturn this.decoder.push(chunk);\n\t}\n\n\tend(): void {\n\t\tthis.decoder.end();","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/earendil-works/pi/blob/4af9d21d3b4d664e4a29fcabfec85171077248e3/packages/protocol/src/codec.ts#L105-L141","documentation":"Error \"Invalid ${this.kind} protocol framing: ${boundedErrorMessage(error)}\" thrown in earendil-works/pi.","triggerScenarios":"Thrown at packages/protocol/src/codec.ts:123 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The framing was invalid; check for a corrupted transport or mismatched maxFrameLength between peers."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4af9d21d3b4d664e4a29fcabfec85171077248e3","analyzedAt":"2026-08-24T13:07:14.692Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}