earendil-works/pi · error · CborError
Unsupported CBOR simple value or floating-point width
Error message
Unsupported CBOR simple value or floating-point width
What it means
Error "Unsupported CBOR simple value or floating-point width" thrown in earendil-works/pi.
Source
Thrown at packages/protocol/src/cbor/decoder.ts:108
case 20:
return false;
case 21:
return true;
case 22:
return null;
case 27: {
const bytes = this.readBytes(8);
const value = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength).getFloat64(0, false);
if (!Number.isFinite(value)) throw new CborError("Decoded CBOR number must be finite");
if (Number.isInteger(value) && !Number.isSafeInteger(value)) {
throw new CborError("Decoded CBOR integer is outside the safe range");
}
return value;
}
case 31:
throw new CborError("CBOR break marker is not supported");
default:
throw new CborError("Unsupported CBOR simple value or floating-point width");
}
}
private readLength(additionalInformation: number, kind: string, limit: number): number {
if (additionalInformation === 31) throw new CborError(`Indefinite-length CBOR ${kind}s are not supported`);
const length = this.readArgument(additionalInformation);
if (length > limit) throw new CborError(`CBOR ${kind} length exceeds configured limit of ${limit}`);
return length;
}
private readArgument(additionalInformation: number): number {
if (additionalInformation < 24) return additionalInformation;
switch (additionalInformation) {
case 24:
return this.readByte();
case 25: {
const bytes = this.readBytes(2);
return bytes[0]! * 0x100 + bytes[1]!;View on GitHub (pinned to 4af9d21d3b)
Solutions
- The payload uses an unsupported simple value or float width. Encode floats as 64-bit and avoid unsupported simple values.
When it happens
Trigger: Thrown at packages/protocol/src/cbor/decoder.ts:108 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/1f433228d255dc9d.
Report an issue: GitHub.