The CBOR data ended prematurely during decoding, before a complete CBOR item could be decoded. This typically happens when a CBOR item's structure indicates more data than is actually present.
An unsupported or invalid value was encountered in a CBOR header byte. The parameter contains the unsupported header byte value. This can occur when decoding CBOR that uses unsupported features or is malformed.
A CBOR numeric value was encoded in a non-canonical form, violating the deterministic encoding requirement of dCBOR (per Section 2.3 of the dCBOR specification).
This error is triggered when:
f97e00)An invalid CBOR simple value was encountered during decoding.
Per Section 2.4 of the dCBOR specification, only false, true,
null, and floating point values are valid simple values in dCBOR.
All other major type 7 values are invalid.
A CBOR text string was not valid UTF-8. The parameter contains the specific error message.
All CBOR text strings (major type 3) must be valid UTF-8 per RFC 8949.
A CBOR text string was not encoded in Unicode Canonical Normalization Form C (NFC).
Per Section 2.5 of the dCBOR specification, all text strings must be in NFC form, and decoders must reject any encoded text strings that are not in NFC.
The decoded CBOR item didn't consume all input data. The parameter contains the number of unused bytes.
This error occurs when decoding functions expect exactly one CBOR item but the input contains additional data after a valid CBOR item.
The keys in a decoded CBOR map were not in the canonical lexicographic order of their encoding.
Per the CDE specification and Section 2.1 of dCBOR, map keys must be in ascending lexicographic order of their encoded representation for deterministic encoding.
A decoded CBOR map contains duplicate keys, which is invalid.
Per Section 2.2 of the dCBOR specification, CBOR maps must not contain duplicate keys, and decoders must reject encoded maps with duplicate keys.
A requested key was not found in a CBOR map during data extraction.
A CBOR numeric value could not be represented in the specified target numeric type.
This occurs when attempting to convert a CBOR number to a numeric type that is too small to represent the value without loss of precision.
The CBOR value is not of the expected type for a conversion or operation.
This occurs when attempting to convert a CBOR value to a type that doesn't match the actual CBOR item's type (e.g., trying to convert a string to an integer).
The CBOR tagged value had a different tag than expected. Contains the expected tag and the actual tag found.
Invalid UTF‑8 in a text string.
Invalid ISO 8601 date format.
Custom error message.
A comprehensive set of errors that can occur during CBOR encoding and decoding operations with special focus on enforcing the deterministic encoding rules specified in the dCBOR specification.
The dCBOR implementation validates all encoded CBOR against the deterministic encoding requirements of RFC 8949 §4.2.1, plus additional constraints defined in the dCBOR application profile. These errors represent all the possible validation failures and decoding issues that can arise.