On this page· 2

Specification

Error kinds

An error kind is the stable name of a failure. An implementation reports the kind as a string. The message beside it is written for people and is not part of the contract: it can change between releases, and a test compares kinds only.

  • error-kind list version 1

The 22 kinds

“Produced by” names the verify step or the operation that reports the kind. Verify steps run in a fixed order, and a verifier that stops at the first failure reports the kind of that step, so two conforming implementations report the same kind for the same file. Section 9, Verify algorithm

Table 1. Error kinds, list version 1 (22)
#KindMeaningProduced byCases
1ioThe operating system refused a read or a write: a missing path, a permission, a short read, a full disk.before verify1
2invalid_headerThe file is shorter than 353 bytes, or the 257-byte header line does not match the header grammar: not ASCII, wrong magic, byte 256 not a line feed, or the wrong number or form of tokens.§9 steps 1 and 2; §3.14
3unsupported_versionThe header or the footer names a format version other than 6.§9 steps 2 and 3; §12.12
5checksum_mismatchThe SHA-256 of bytes 257 up to L − 96 differs from the digest in the footer.§9 step 6; §62
7record_count_mismatchThe number of record lines differs from the footer’s record_count.§9 step 81
8invalid_utf8The body, bytes 257 up to T, is not valid UTF-8.§9 step 7; §4.11
9invalid_recordA line is not a JSON object, has no string member k, or the appendix marker line is misplaced or missing.§9 step 7; §4.1, §4.24
10jsonA line is not valid JSON, holds a lone surrogate, or a typed record fails its schema: a REQUIRED member is missing, or a member has the wrong JSON type.§9 step 7; §4.3, §10.23
11appendix_invalidThe embedded container fails a structural check: its magic, an unsupported version byte, its header, a section table outside the container, nonzero reserved descriptor bytes, a data range outside the container, or a tensor catalog section that cannot be read.§9 step 9; §7.2, §7.38
12appendix_crc_mismatchA CRC32C check on the appendix fails: the section table’s checksum, a section’s checksum, or the footer’s copy of the container checksum.§9 step 9; §7.32
13appendix_alignmentcsdt_offset is not a multiple of 64, an alignment exponent is above the accepted maximum, or the start of an aligned view is misaligned. There is no fallback that copies the bytes.§9 step 5; §7.32
14appendix_legacy_versionMerge was given an appendix in an older container version. Reading it is allowed; merging it is refused, so it is never converted without notice.§8.1 precondition 2; §7.21
15section_type_mismatchA consumer bound an embref target under the Compact embedding profile, and the section is not a Compact section with the Compact record stride and data type.§9 step 103
16dangling_embrefA consumer bound a target that does not resolve: a section index or record index out of range, no appendix, or an ext target with no matching csdt_ref record.§9 step 104
17merge_conflictMerge cannot combine the inputs: an appendix holds a tensor catalog section, or a section type is not registered.§8.1 preconditions 3 and 42
18shard_unsupported_spec ReservedThe shard request cannot be served by this pack: a request to shard by group (cluster), or a seed or listed entity that is not in the pack.§8.30
19shard_quality_below_threshold ReservedThe shard’s quality score, as defined in section 8.3, is below the caller’s minimum.§8.30
20limit_exceededA size the caller capped, or the platform’s address width, cannot hold a value: an input or inflated size above the caller’s cap, or an offset that cannot be an in-memory index (for example at or above 2^32 on a 32-bit platform). Values are never truncated.§9 step 52
21unsupportedThe file is well formed but uses a feature this implementation does not have, such as an appendix payload class or data type it does not know.§7.4; §151
22internalA defect in the implementation itself. Never the file’s fault.—0

Reading the list

  • 17 kinds are named in the published specification. io, unsupported and internal are not: they describe the environment and the implementation, not the file. appendix_invalid and appendix_crc_mismatch are raised by the container checks of section 7.3.
  • A kind describes a pack, or the inputs of an operation, as data. A caller’s own mistake, such as a wrong argument type or an unknown option name, is reported by the host language’s ordinary means and is not a kind.
  • A lookup that can find nothing returns an empty value, not an error.
  • No conformance case expects internal. A run that reports it has found a defect in the implementation under test.
  • An implementation that meets a kind string it does not know reports it unchanged.
Sections