Fluid Forge
Get Started
See it run
  • Local (DuckDB)
  • Source-Aligned (Postgres → DuckDB)
  • AI Forge + Data Models
  • GCP (BigQuery)
  • Snowflake Team Collaboration
  • Declarative Airflow
  • Orchestration Export
  • Jenkins CI/CD
  • Universal Pipeline
  • 11-Stage Production Pipeline
  • Catalog Forge End-to-End
CLI Reference
  • Overview
  • Quickstart
  • Examples
  • Your own CI
  • Your own scaffolding
  • Custom validator
  • Apply hook
  • Reference
Demos
  • Overview
  • Architecture
  • GCP (BigQuery)
  • AWS (S3 + Athena)
  • Snowflake
  • Local (DuckDB)
  • Custom Providers
  • Roadmap
GitHub
GitHub
Get Started
See it run
  • Local (DuckDB)
  • Source-Aligned (Postgres → DuckDB)
  • AI Forge + Data Models
  • GCP (BigQuery)
  • Snowflake Team Collaboration
  • Declarative Airflow
  • Orchestration Export
  • Jenkins CI/CD
  • Universal Pipeline
  • 11-Stage Production Pipeline
  • Catalog Forge End-to-End
CLI Reference
  • Overview
  • Quickstart
  • Examples
  • Your own CI
  • Your own scaffolding
  • Custom validator
  • Apply hook
  • Reference
Demos
  • Overview
  • Architecture
  • GCP (BigQuery)
  • AWS (S3 + Athena)
  • Snowflake
  • Local (DuckDB)
  • Custom Providers
  • Roadmap
GitHub
GitHub
  • Introduction

    • Home
    • Getting Started
    • Snowflake Quickstart
    • See it run
    • Forge Data Model
    • Vision & Roadmap
    • Playground
    • FAQ
  • Concepts

    • Concepts
    • Builds, Exposes, Bindings
    • What is a contract?
    • Quality, SLAs & Lineage
    • Governance & Policy
    • Agent Policy (LLM/AI governance)
    • Providers vs Platforms
    • Fluid Forge vs alternatives
  • Data Products

    • Product Types — SDP, ADP, CDP
  • Walkthroughs

    • Walkthrough: Local Development
    • Source-Aligned: Postgres → DuckDB → Parquet
    • AI Forge And Data-Model Journeys
    • Walkthrough: Deploy to Google Cloud Platform
    • Walkthrough: Snowflake Team Collaboration
    • Declarative Airflow DAG Generation - The FLUID Way
    • Generating Orchestration Code from Contracts
    • Jenkins CI/CD for FLUID Data Products
    • Universal Pipeline
    • The 11-Stage Pipeline
    • End-to-End Walkthrough: Catalog → Contract → Transformation
  • CLI Reference

    • CLI Reference
    • fluid init
    • fluid demo
    • fluid forge
    • fluid skills
    • fluid status
    • fluid validate
    • fluid plan
    • fluid apply
    • fluid generate
    • fluid generate artifacts
    • fluid validate-artifacts
    • fluid verify-signature
    • fluid generate-airflow
    • fluid generate-pipeline
    • fluid viz-graph
    • fluid odps
    • fluid odps-bitol
    • fluid odcs
    • fluid export
    • fluid export-opds
    • fluid publish
    • fluid datamesh-manager
    • fluid market
    • fluid import
    • fluid policy
    • fluid policy check
    • fluid policy compile
    • fluid policy apply
    • fluid contract-tests
    • fluid contract-validation
    • fluid diff
    • fluid test
    • fluid verify
    • fluid product-new
    • fluid product-add
    • fluid workspace
    • fluid ide
    • fluid ai
    • fluid memory
    • fluid mcp
    • fluid scaffold-ci
    • fluid scaffold-composer
    • fluid scaffold-ide
    • fluid docs
    • fluid config
    • fluid split
    • fluid bundle
    • fluid auth
    • fluid doctor
    • fluid providers
    • fluid provider-init
    • fluid roadmap
    • fluid version
    • fluid runs
    • fluid retention
    • fluid secrets
    • fluid stats
    • fluid contract
    • fluid ship
    • fluid rollback
    • fluid schedule-sync
    • Catalog adapters

      • Source Catalog Integration (V1.5)
      • BigQuery Catalog
      • Snowflake Horizon Catalog
      • Databricks Unity Catalog
      • Google Dataplex Catalog
      • AWS Glue Data Catalog
      • DataHub Catalog
      • Data Mesh Manager Catalog
    • CLI by task

      • CLI by task
      • Add quality rules
      • Add agent governance
      • Debug a failed pipeline run
      • Switch clouds with one line
  • Recipes

    • Recipes
    • Recipe — add a quality rule
    • Recipe — switch clouds with one line
    • Recipe — tag PII in your schema
  • SDK & Plugins

    • SDK & Plugins
    • Quickstart — your first plugin
    • Examples

      • Runnable examples
      • Example: hello-scaffold — the minimal viable plugin
      • Example: gitlab-ci-scaffold — generate a complete CI project
      • Example: steward-validator — a custom governance rule
      • Example: prod-key-guard — apply-time invariant check
    • Journeys

      • Journeys
      • Your own CI/CD

        • You have your own CI/CD setup, no problem
        • GitLab CI — the bundle template
        • GitHub Actions — the bundle template
        • Jenkins — the bundle template
        • CircleCI — the bundle template
      • You have a strict project layout, no problem
      • You have governance rules, no problem
      • You want a check at apply time, no problem
    • Reference

      • Reference
      • Roles reference
      • Entry points reference
      • Trust model
      • Packaging
      • Companion packages
  • Providers

    • Providers
    • Provider Architecture
    • GCP Provider
    • AWS Provider
    • Snowflake Provider
    • Local Provider
    • Creating Custom Providers
    • Provider Roadmap
  • Advanced

    • Blueprints
    • Governance & Compliance
    • Airflow Integration
    • Built-in And Custom Forge Guidance
    • FLUID Forge Contract GPT Packet
    • Forge Discovery Guide
    • Forge Memory Guide
    • LLM Providers
    • Capability Warnings
    • LiteLLM Backend (opt-in)
    • MCP Server
    • Credential Resolver — Security Model
    • Cost Tracking
    • Agentic Primitives
    • Typed Errors
    • Typed CLI Errors
    • Authoring Forge Tools
    • Source-Aligned Acquisition
    • API Stability — fluid_build.api
    • Guided fluid forge UX
    • V1.5 Catalog Integration — Architecture Deep-Dive
    • V1.5 + V2 Hardening — Release Notes
  • Project

    • Contributing to Fluid Forge
    • Fluid Forge Docs Baseline: CLI 0.8.3
    • Fluid Forge Docs Baseline: CLI 0.8.0
    • Fluid Forge Docs Baseline: CLI 0.7.11
    • Fluid Forge Docs Baseline: CLI 0.7.9
    • Fluid Forge v0.7.1 - Multi-Provider Export Release

Typed CLI Errors

The upcoming 0.7.3 release introduces a 15-class typed-error catalog at fluid_build.cli._errors. Every user-facing CLI error renders the same five-field shape: what, where, why, fix, doc. JSON output is stable so CI log parsers and IDE integrations can consume it without regex.

Where this fits

This is the CLI-level error catalog, distinct from the agent-layer typed errors (RateLimitError, ContextOverflowError, etc.) documented at Typed Errors. CLI errors fire from user-facing commands; agent errors fire inside the LLM provider stack.

The five-field shape

Every typed error renders like this when printed to a terminal:

✗ SchemaDriftError [code: schema_drift]
  what:  Source schema added 2 columns since last run.
  where: build=ingest_orders product=bronze.crm_orders run=2026-04-30T14-22-08
  why:   schemaEvolution.policy=strict — additive changes are not allowed.
  fix:   Set schemaEvolution.policy=evolve_safe to accept additive changes,
         or update the contract's schema block to declare the new columns.
  doc:   /advanced/source-aligned-acquisition.html#schema-evolution

And like this when the calling command was given --json:

{
  "error": "SchemaDriftError",
  "code": "schema_drift",
  "what": "Source schema added 2 columns since last run.",
  "where": { "build": "ingest_orders", "product": "bronze.crm_orders", "run": "2026-04-30T14-22-08" },
  "why": "schemaEvolution.policy=strict — additive changes are not allowed.",
  "fix": "Set schemaEvolution.policy=evolve_safe to accept additive changes...",
  "doc": "/advanced/source-aligned-acquisition.html#schema-evolution",
  "extras": { "addedColumns": ["customer_tier", "loyalty_points"] }
}

The extras field carries error-class-specific structured detail (added columns, retry-after seconds, secret reference, etc.).

The 15 typed errors

All inherit from FluidUserError (which subclasses Exception). Each has a for_* factory that constructs the right where/extras for the calling context.

Validation & schema

ClassWhen it fires
SchemaValidationErrorA contract field didn't satisfy the v0.7.3 JSON schema. The what field cites the JSON-pointer path.
SchemaDriftErrorThe source schema changed between runs and the policy doesn't accept the kind of change.

Capability negotiation

ClassWhen it fires
CapabilityMismatchErrorThe contract requires a capability (e.g. exactly_once) that the resolved runner doesn't declare.
MissingExtraErrorAn optional package isn't installed (pip install 'data-product-forge[litellm]', etc.).

Connectivity & secrets

ClassWhen it fires
ConnectivityProbeError--probe was set on fluid validate and a source connectivity test failed (e.g. Postgres unreachable).
SecretResolutionErrorA ${SECRET:...} placeholder couldn't be resolved from the keychain at apply time.

Pipeline operations

ClassWhen it fires
PartialFailureErrorSome streams in the run succeeded; others failed. Exit code 2 (the partial-failure signal).
DLQOverflowErrordlq.maxRecordsBeforeAbort exceeded — the run aborted instead of dropping records silently.
LockHeldErrorThe single-flight lock for (product, build, env) is held by another run; this one was rejected.
StaleReplayErrorA replay was requested past the retention.runState horizon — the manifest is no longer available.

Governance

ClassWhen it fires
BudgetExceededErrorThe projected run cost would exceed the contract's monthly budget cap; cost.onExceed=fail.
SovereigntyViolationErrorA connector / sink combination is not allowed in the declared jurisdiction.
ResidencyViolationErrorA data transfer would violate metadata.dataResidency.region / prohibitTransferTo.
SupplyChainViolationErrorA container image failed Cosign signature verification — its signature couldn't be verified with the configured public key, or its signer isn't on sovereignty.allowedSigners. Fix: pin a Cosign-signed image signed with the configured key, or update sovereignty.allowedSigners.
InfraDriftErrorThe live infrastructure version doesn't match what was declared (e.g. Helm chart drift).

Exit-code contract

The CLI exit-code contract is uniform across all 15 error classes so CI matrices stay simple:

Exit codeMeaning
0Success
1User error — fix the contract or arguments and rerun
2Partial — some work completed, some failed (e.g. PartialFailureError)
3Transient — retry might succeed (ConnectivityProbeError, LockHeldError)
4Internal — file an issue with the JSON output and traceback

SchemaValidationError, CapabilityMismatchError, MissingExtraError, BudgetExceededError, SovereigntyViolationError, ResidencyViolationError, SupplyChainViolationError, SecretResolutionError, DLQOverflowError, SchemaDriftError, InfraDriftError → exit code 1.

PartialFailureError → exit code 2.

ConnectivityProbeError, LockHeldError, StaleReplayError → exit code 3.

Anything else (uncaught Python exceptions in the CLI) → exit code 4.

Catching them programmatically

from fluid_build.cli._errors import (
    FluidUserError,
    SchemaValidationError,
    BudgetExceededError,
    PartialFailureError,
)

try:
    run_pipeline(contract)
except SchemaValidationError as e:
    log.warning("validation failed", extra=e.as_json())
    raise
except BudgetExceededError as e:
    notify_finance(e.extras["projected_usd"], e.extras["budget_usd"])
    raise
except FluidUserError as e:
    # Catch-all for unexpected typed errors
    log.error("typed error", extra=e.as_json())
    raise

as_json() returns the same JSON shape as --json mode, so error-handling code can rely on the stable structure regardless of which class fired.

See also

  • Source-Aligned Acquisition — the framework these errors guard
  • Typed Errors — the agent-layer typed errors (LLM-side; distinct catalog)
  • fluid validate --probe — what triggers ConnectivityProbeError
  • fluid retention sweep — what StaleReplayError is preventing
Edit this page on GitHub
Last Updated: 5/17/26, 6:10 PM
Contributors: fas89, Claude Opus 4.7 (1M context)
Prev
Typed Errors
Next
Authoring Forge Tools