Skip to main content

Error Catalog

All error codes defined in TeckelErrorCode. Each error follows the format E-{CATEGORY}-{NUMBER} and corresponds to a specific validation rule or failure condition from the Teckel Specification.

Module: crates/teckel-model/src/error.rs

Error types

The TeckelError enum has five variants:

pub enum TeckelError {
/// A spec-defined error with a code and message.
Spec { code: TeckelErrorCode, message: String },

/// YAML parsing failed.
Yaml(String),

/// I/O error.
Io(std::io::Error),

/// Multiple validation errors collected in a single pass.
Validation { count: usize, errors: Vec<TeckelError> },

/// Runtime execution error.
Execution(String),
}

Error codes

Schema

CodeVariantDescription
E-REQ-001EReq001Missing required field

Naming

CodeVariantDescription
E-NAME-001EName001Duplicate AssetRef
E-NAME-002EName002Invalid AssetRef format (must match ^[a-zA-Z][a-zA-Z0-9_-]{0,127}$)
E-NAME-003EName003Column name collision after rename

Reference

CodeVariantDescription
E-REF-001ERef001Undefined asset reference
E-REF-002ERef002Invalid output reference (output references output)
E-CYCLE-001ECycle001Circular dependency detected in the pipeline DAG

Format

CodeVariantDescription
E-FMT-001EFmt001Unknown data format
E-MODE-001EMode001Unknown write mode

Transformation

CodeVariantDescription
E-OP-001EOp001Zero or multiple operation keys in transformation
E-OP-002EOp002Unknown operation key

Schema validation

CodeVariantDescription
E-LIST-001EList001Empty list where NonEmptyList required
E-ENUM-001EEnum001Invalid enum value

Column

CodeVariantDescription
E-COL-001ECol001Column not found in dataset

Join

CodeVariantDescription
E-JOIN-001EJoin001Ambiguous column reference in join condition

Aggregation

CodeVariantDescription
E-AGG-001EAgg001Non-aggregate expression in group-by output

Expression

CodeVariantDescription
E-EXPR-001EExpr001Expression type mismatch or parse error

Schema compatibility

CodeVariantDescription
E-SCHEMA-001ESchema001Incompatible schemas in set operation
E-SCHEMA-002ESchema002Operation would produce empty schema
E-SCHEMA-003ESchema003Unexpected extra columns in strict mode
E-SCHEMA-004ESchema004Missing expected columns in strict mode

Type

CodeVariantDescription
E-TYPE-001EType001Incompatible types, cannot widen

I/O

CodeVariantDescription
E-IO-001EIo001Input path not found or unreadable
E-IO-002EIo002Output destination already exists (error mode)

Substitution

CodeVariantDescription
E-VAR-001EVar001Unresolved variable with no default

Secrets

CodeVariantDescription
E-SECRET-001ESecret001Unresolved secret reference

Hooks

CodeVariantDescription
E-HOOK-001EHook001Pre-execution hook failed

Custom components

CodeVariantDescription
E-COMP-001EComp001Unregistered custom component

Quality

CodeVariantDescription
E-QUALITY-001EQuality001Assertion or quality check failed
E-QUALITY-002EQuality002Unknown quality check type
E-QUALITY-003EQuality003Invalid threshold value
E-QUALITY-004EQuality004Freshness check failed
E-QUALITY-005EQuality005Referential integrity check failed

Metadata

CodeVariantDescription
E-META-001EMeta001Invalid owner type
E-META-002EMeta002Invalid maturity value
E-META-003EMeta003Invalid freshness duration
E-META-004EMeta004Column metadata references non-existent column

Exposures

CodeVariantDescription
E-EXPOSE-001EExpose001Exposure depends_on references undefined asset
E-EXPOSE-002EExpose002Unknown exposure type

Version

CodeVariantDescription
E-VERSION-001EVersion001Missing or unsupported version field

Total: 34 error codes

Usage

Create spec errors using the convenience constructor:

use teckel_model::{TeckelError, TeckelErrorCode};

let err = TeckelError::spec(
TeckelErrorCode::ERef001,
"asset \"filtered\" references undefined asset \"emplyees\"",
);

// Display format: [E-REF-001] asset "filtered" references undefined asset "emplyees"
println!("{err}");

Handling validation errors

When multiple errors are found, they are wrapped in a Validation variant:

match result {
Err(TeckelError::Validation { count, errors }) => {
eprintln!("Found {count} validation error(s):");
for err in &errors {
eprintln!(" {err}");
}
}
Err(err) => eprintln!("Error: {err}"),
Ok(pipeline) => { /* success */ }
}