Skip to Content
DocsCompilerError Reference

Error Reference

LODE functions throw descriptive errors. This page catalogs all error messages by source.

Schema Validation (loadLode)

ErrorCause
Invalid schema type: expected "lode", got "<x>"schema field is not "lode"
Invalid schema version: <n>Version is not a positive number
Schema must have a non-empty namename is missing or empty
Schema must have at least one fieldfields is empty or not an array
Field <i>: id must be 1-255, got <n>Field ID is out of the valid range
Duplicate field id: <n>Two fields share the same numeric ID
Duplicate field name: "<name>"Two fields share the same name
Field "<name>": unknown type "<type>"Type string is not one of the four supported types

Encoding (compile)

ErrorCause
Required field "<name>" is missingA required field is undefined or null in the source
Unknown type "<type>" for field "<name>"Type tag lookup failed (should not occur with validated schemas)
Field "<name>" expected string, got <type>Source value is not a string
Field "<name>" expected boolean, got <type>Source value is not a boolean
Field "<name>" expected array, got <type>Source value is not an array
Field "<name>" expected object, got <type>Source value for a map field is not an object

Decoding (decode)

ErrorCause
Vein too short: expected at least 4 bytesInput buffer is less than 4 bytes
Invalid magic: expected 0x4C44 ("LD"), got 0x<xx><xx>First two bytes are not LD
Version mismatch: vein is v<n>, schema is v<m>Binary version does not match schema version
Unexpected end of vein at field <i>Not enough bytes for the next field header
Field <id> declares length <n> but only <m> bytes remainField data extends past end of buffer
Required field "<name>" (id=<n>) not found in veinA required field was not present in the binary
Bool field "<name>" expected 1 byte, got <n>Boolean field data is not exactly 1 byte
Unknown type tag 0x<xx> for field "<name>"Unrecognized type tag in binary

Verification (verify)

verify never throws. It returns false on any error during decoding or fingerprint computation.

Last updated on