Skip to content

bug: expose actionable output-format errors at the process boundary #343

Description

@codeforester

Problem

The public renderer raises OutputFormatError with an actionable dependency hint, but run_app() classifies it as an unexpected internal error and suppresses that hint. Consumers need error discipline for an advertised optional format without adding library-specific exception handling to every command.

Verified evidence

Reviewed on 2026-09-12 at 7faf347a5b90969e169c88f3ac18e7202d142dd0; the local checkout matches GitHub main.

A minimal installed consumer delegates --format yaml to render_records without PyYAML installed. The renderer raises OutputFormatError explaining that YAML needs base-cli[yaml]; the user sees only:

Error: Unexpected internal error.
Re-run with --debug for a traceback.

This occurs in the released 0.4.3 demo and follows the same uncaught OutputFormatError path on reviewed framework main. Invalid renderer format selections reach the same classification.

Sources:

Acceptance criteria

  • Classify expected public output-format/dependency errors explicitly and retain their safe actionable message.
  • Specify a stable exit status and JSON envelope code for these errors.
  • Keep genuinely unexpected exceptions redacted under the current policy.
  • Test minimal installed-package YAML failure and the human/JSON error paths.

Related work

The demo also needs to align its advertised YAML capability and dependency policy; fixing this diagnostic alone does not supply that dependency.

Project fields

  • Status: Backlog
  • Priority: P2
  • Area: CLI
  • Initiative: v1.0 Readiness
  • Size: S
  • Assignee: @codeforester
  • Milestone: v1.0.0
  • Target date: unscheduled

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething is not working

Type

Projects

  • Status
    Backlog

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions