earendil-works/pi · error · CborError
CBOR byte string length exceeds configured limit of ${option
Error message
CBOR byte string length exceeds configured limit of ${options.maxByteLength} What it means
Error "CBOR byte string length exceeds configured limit of ${options.maxByteLength}" thrown in earendil-works/pi.
Source
Thrown at packages/protocol/src/cbor/encoder.ts:154
}
if (typeof value === "number") {
if (!Number.isFinite(value)) throw new CborError("CBOR numbers must be finite");
if (Number.isInteger(value) && !Object.is(value, -0)) {
if (!Number.isSafeInteger(value)) throw new CborError("CBOR integers must be safe JavaScript integers");
if (value >= 0) writeArgument(writer, 0, value);
else writeArgument(writer, 1, -1 - value);
} else {
writer.writeFloat64(value);
}
return;
}
if (typeof value === "string") {
encodeText(writer, value, options);
return;
}
if (value instanceof Uint8Array) {
if (value.byteLength > options.maxByteLength) {
throw new CborError(`CBOR byte string length exceeds configured limit of ${options.maxByteLength}`);
}
writeArgument(writer, 2, value.byteLength);
writer.writeBytes(value);
return;
}
if (Array.isArray(value)) {
if (ancestors.has(value)) throw new CborError("CBOR values must not contain cycles");
if (value.length > options.maxContainerLength) {
throw new CborError(`CBOR array length exceeds configured limit of ${options.maxContainerLength}`);
}
ancestors.add(value);
try {
writeArgument(writer, 4, value.length);
for (let index = 0; index < value.length; index++) {
if (!Object.hasOwn(value, index) || value[index] === undefined) {
throw new CborError("CBOR arrays must not contain holes or undefined values");
}
encodeValue(writer, value[index], options, depth + 1, ancestors);View on GitHub (pinned to 4af9d21d3b)
Solutions
- Shorten the byte string or raise options.maxByteLength.
When it happens
Trigger: Thrown at packages/protocol/src/cbor/encoder.ts:154 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of earendil-works/pi@4af9d21d3b (2026-08-24).
Data as JSON: /api/errors/53f64cd08741b0a6.
Report an issue: GitHub.