{"record":{"id":"bd67bf96988385da","repo":"earendil-works/pi","slug":"cbor-byte-length-exceeds-configured-limit-of-res","errorCode":null,"errorMessage":"CBOR byte length exceeds configured limit of ${resolved.maxByteLength}","messagePattern":"CBOR byte length exceeds configured limit of (.+?)","errorType":"exception","errorClass":"CborError","httpStatus":null,"severity":"error","filePath":"packages/protocol/src/cbor/decoder.ts","lineNumber":165,"sourceCode":"\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}\n}\n\n/** Decodes exactly one item from the protocol's strict RFC 8949 subset. */\nexport function decodeCbor(bytes: Uint8Array, options?: CborOptions): unknown {\n\tif (!(bytes instanceof Uint8Array)) throw new TypeError(\"CBOR input must be a Uint8Array\");\n\tconst resolved = resolveOptions(options);\n\tif (bytes.byteLength > resolved.maxByteLength) {\n\t\tthrow new CborError(`CBOR byte length exceeds configured limit of ${resolved.maxByteLength}`);\n\t}\n\treturn new CborReader(bytes, resolved).decode();\n}\n","sourceCodeStart":147,"sourceCodeEnd":169,"githubUrl":"https://github.com/earendil-works/pi/blob/4af9d21d3b4d664e4a29fcabfec85171077248e3/packages/protocol/src/cbor/decoder.ts#L147-L169","documentation":"Error \"CBOR byte length exceeds configured limit of ${resolved.maxByteLength}\" thrown in earendil-works/pi.","triggerScenarios":"Thrown at packages/protocol/src/cbor/decoder.ts:165 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reduce the input size or raise resolved.maxByteLength in the decoder options."],"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"}