{"record":{"id":"19d7aa22766fe191","repo":"earendil-works/pi","slug":"cbor-byte-length-exceeds-configured-limit-of-thi","errorCode":null,"errorMessage":"CBOR byte length exceeds configured limit of ${this.maxByteLength}","messagePattern":"CBOR byte length exceeds configured limit of (.+?)","errorType":"exception","errorClass":"CborError","httpStatus":null,"severity":"error","filePath":"packages/protocol/src/cbor/encoder.ts","lineNumber":71,"sourceCode":"\t\tthis.writeUint32(high);\n\t\tthis.writeUint32(low);\n\t}\n\n\twriteFloat64(value: number): void {\n\t\tthis.ensureCapacity(9);\n\t\tthis.buffer[this.offset] = 0xfb;\n\t\tnew DataView(this.buffer.buffer).setFloat64(this.offset + 1, value, false);\n\t\tthis.offset += 9;\n\t}\n\n\tfinish(): Uint8Array {\n\t\treturn this.buffer.slice(0, this.offset);\n\t}\n\n\tprivate ensureCapacity(additionalBytes: number): void {\n\t\tconst required = this.offset + additionalBytes;\n\t\tif (required > this.maxByteLength) {\n\t\t\tthrow new CborError(`CBOR byte length exceeds configured limit of ${this.maxByteLength}`);\n\t\t}\n\t\tif (required <= this.buffer.byteLength) return;\n\n\t\tlet capacity = Math.max(1, this.buffer.byteLength);\n\t\twhile (capacity < required) capacity = Math.min(this.maxByteLength, Math.max(required, capacity * 2));\n\t\tconst expanded = new Uint8Array(capacity);\n\t\texpanded.set(this.buffer);\n\t\tthis.buffer = expanded;\n\t}\n}\n\nfunction writeArgument(writer: CborWriter, majorType: number, value: number): void {\n\tconst prefix = majorType << 5;\n\tif (value < 24) {\n\t\twriter.writeByte(prefix | value);\n\t} else if (value <= 0xff) {\n\t\twriter.writeByte(prefix | 24);\n\t\twriter.writeByte(value);","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/earendil-works/pi/blob/4af9d21d3b4d664e4a29fcabfec85171077248e3/packages/protocol/src/cbor/encoder.ts#L53-L89","documentation":"Error \"CBOR byte length exceeds configured limit of ${this.maxByteLength}\" thrown in earendil-works/pi.","triggerScenarios":"Thrown at packages/protocol/src/cbor/encoder.ts:71 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reduce the encoded value size or raise the encoder's maxByteLength limit."],"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"}