{"record":{"id":"25fe47058a1a03cf","repo":"earendil-works/pi","slug":"indefinite-length-cbor-items-are-not-supported","errorCode":null,"errorMessage":"Indefinite-length CBOR items are not supported","messagePattern":"Indefinite-length CBOR items are not supported","errorType":"exception","errorClass":"CborError","httpStatus":null,"severity":"error","filePath":"packages/protocol/src/cbor/decoder.ts","lineNumber":139,"sourceCode":"\t\tswitch (additionalInformation) {\n\t\t\tcase 24:\n\t\t\t\treturn this.readByte();\n\t\t\tcase 25: {\n\t\t\t\tconst bytes = this.readBytes(2);\n\t\t\t\treturn bytes[0]! * 0x100 + bytes[1]!;\n\t\t\t}\n\t\t\tcase 26: {\n\t\t\t\tconst bytes = this.readBytes(4);\n\t\t\t\treturn bytes[0]! * 0x1_000_000 + bytes[1]! * 0x1_0000 + bytes[2]! * 0x100 + bytes[3]!;\n\t\t\t}\n\t\t\tcase 27: {\n\t\t\t\tconst high = this.readArgument(26);\n\t\t\t\tconst low = this.readArgument(26);\n\t\t\t\tif (high > 0x1f_ffff) throw new CborError(\"Decoded CBOR integer or length is outside the safe range\");\n\t\t\t\treturn high * UINT32_BASE + low;\n\t\t\t}\n\t\t\tcase 31:\n\t\t\t\tthrow new CborError(\"Indefinite-length CBOR items are not supported\");\n\t\t\tdefault:\n\t\t\t\tthrow new CborError(\"Malformed CBOR additional information\");\n\t\t}\n\t}\n\n\tprivate readByte(): number {\n\t\tif (this.offset >= this.bytes.byteLength) throw new CborError(\"Truncated CBOR payload\");\n\t\tconst value = this.bytes[this.offset]!;\n\t\tthis.offset++;\n\t\treturn value;\n\t}\n\n\tprivate readBytes(length: number): Uint8Array {\n\t\tif (length > this.bytes.byteLength - this.offset) throw new CborError(\"Truncated CBOR payload\");\n\t\tconst value = this.bytes.subarray(this.offset, this.offset + length);\n\t\tthis.offset += length;\n\t\treturn value;\n\t}","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/earendil-works/pi/blob/4af9d21d3b4d664e4a29fcabfec85171077248e3/packages/protocol/src/cbor/decoder.ts#L121-L157","documentation":"Error \"Indefinite-length CBOR items are not supported\" thrown in earendil-works/pi.","triggerScenarios":"Thrown at packages/protocol/src/cbor/decoder.ts:139 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use definite-length CBOR items; indefinite-length encoding is not supported."],"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"}