{"record":{"id":"eee7d46fccb6f3fa","repo":"earendil-works/pi","slug":"cbor-text-string-length-exceeds-configured-limit-o","errorCode":null,"errorMessage":"CBOR text string length exceeds configured limit of ${options.maxByteLength}","messagePattern":"CBOR text string length exceeds configured limit of (.+?)","errorType":"exception","errorClass":"CborError","httpStatus":null,"severity":"error","filePath":"packages/protocol/src/cbor/encoder.ts","lineNumber":111,"sourceCode":"\t} else if (value <= MAX_UINT32) {\n\t\twriter.writeByte(prefix | 26);\n\t\twriter.writeUint32(value);\n\t} else {\n\t\twriter.writeByte(prefix | 27);\n\t\twriter.writeUint64(value);\n\t}\n}\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === Object.prototype || prototype === null;\n}\n\nfunction encodeText(writer: CborWriter, value: string, options: ResolvedCborOptions): void {\n\tconst bytes = textEncoder.encode(value);\n\tif (bytes.byteLength > options.maxByteLength) {\n\t\tthrow new CborError(`CBOR text string length exceeds configured limit of ${options.maxByteLength}`);\n\t}\n\tif (textDecoder.decode(bytes) !== value)\n\t\tthrow new CborError(\"CBOR text strings must contain valid Unicode scalar values\");\n\twriteArgument(writer, 3, bytes.byteLength);\n\twriter.writeBytes(bytes);\n}\n\nfunction encodeValue(\n\twriter: CborWriter,\n\tvalue: unknown,\n\toptions: ResolvedCborOptions,\n\tdepth: number,\n\tancestors: Set<object>,\n): void {\n\tif (depth > options.maxDepth)\n\t\tthrow new CborError(`CBOR nesting depth exceeds configured limit of ${options.maxDepth}`);\n\n\tif (value === null) {","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/earendil-works/pi/blob/4af9d21d3b4d664e4a29fcabfec85171077248e3/packages/protocol/src/cbor/encoder.ts#L93-L129","documentation":"Error \"CBOR text string length exceeds configured limit of ${options.maxByteLength}\" thrown in earendil-works/pi.","triggerScenarios":"Thrown at packages/protocol/src/cbor/encoder.ts:111 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Shorten the text string or raise options.maxByteLength."],"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"}