Skip to content

CLI: ingest --error handling

When model ingestion fails (missing file, network error, invalid format), hwLedger follows the fail-loudly invariant: no silent fallback, clear error message pointing to the problem.

What you'll see

Running ingest with a missing file:

bash
hwledger ingest gguf:///tmp/does-not-exist.gguf

The tool returns:

  • Exit code: 3 (Resource not found)
  • Error message: "File not found: /tmp/does-not-exist.gguf"
  • Hint: "Check the path and try again"

No silent retry, no hidden cache hit. The error is loud and actionable.

Journey not yet recorded.

Run the journey recorder to capture interactions:

./apps/macos/HwLedgerUITests/scripts/run-journeys.sh

What to watch for

  • Clear error type: "File not found" (not "I/O error" or "generic failure")
  • Full path printed: Exact path that was looked up
  • Exit code: Non-zero so scripts can detect failure
  • No hiding: Not silently using a cached version or retrying forever
  • Actionable hint: "Check the path" tells you what to do next

Next steps

Reproduce

bash
# Fail explicitly (file doesn't exist)
hwledger ingest gguf:///tmp/does-not-exist.gguf
# Exit code: 3
# stderr: File not found: /tmp/does-not-exist.gguf

Source

Recorded journey tape on GitHub

Released under the Apache 2.0 License.