Skip to content

const HEAP_INVALID_INPUT_ERROR_CODES: readonly ["EMPTY", "INVALID_ARITY", "INVALID_CAPACITY", "INVALID_VALUE", "DUPLICATE_VALUE", "VALUE_NOT_FOUND", "FOREIGN_STRUCTURE", "MISSING_ELEMENT_CODEC", "INVALID_CODEC_RESULT", "NON_INJECTIVE_CODEC", "SERIALIZATION_LIMIT_EXCEEDED"]

Defined in: packages/heap/src/errors.ts:21

The canonical, ordered list of machine-readable error codes emitted by knotkit/heap’s public API.

The list spans both throwing classes: HeapInvalidInputError for caller-state failures (EMPTY, INVALID_ARITY, DUPLICATE_VALUE, VALUE_NOT_FOUND, FOREIGN_STRUCTURE) and HeapParseError for payload failures (INVALID_SHAPE, UNSUPPORTED_SCHEMA_VERSION, UNKNOWN_KIND, MISSING_NODES, MISSING_ENTRIES, HEAP_INVARIANT_VIOLATION, INVALID_ELEMENT, INVALID_KEY, INVALID_VALUE). INVALID_ARITY, DUPLICATE_VALUE, and INVALID_CODEC_RESULT appear in both classes — rejected at factory or serialize time as invalid input, and rejected at deserialize time as malformed payloads — because the codes are scoped to the package, not to one class. MISSING_ELEMENT_CODEC is invalid input in both directions: an absent codec is a caller contract violation, never a property of the bytes being decoded.