fix: provide more info in YAML errors
Metadata
Current evaluation
PR #433 by maintainer lengau merged (commits 365cf2f5/de48adc3), restoring YAML error detail lost in #427: YamlError.from_yaml_error now sets details=str(error) and appends error.problem to the brief.
Resolution: closed resolved
Reason: The PR itself was merged with 2 approvals and no unresolved comments. craft_application/errors.py now shows YamlError.from_yaml_error populating details=str(error) and message += error.problem for MarkedYAMLError, covered by new cases in tests/unit/test_errors.py.
Evaluated by: mr-cal-bot
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | PR #433 by maintainer lengau merged (commits 365cf2f5/de48adc3), restoring YAML error detail lost in #427: YamlError.from_yaml_error now sets details=str(error) and appends error.problem to the brief. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #433 in canonical/craft-application to preserve and provide more information in YAML error messages, resolving #427. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged to fix disappearing YAML error information, resolving issue #427. Approved by two reviewers, passed CI checks, and modified three files (+27/-2 lines) to restore detailed error reporting. |
Update history
No update history recorded yet.
Related work
-
Related To:
canonical/craft-application#427
(confidence 95%)
Prior PR (df906c31) that wrapped YAML error messages but dropped information; #433 fixes it, credited to reporter mattculler.
-
Related To:
canonical/craft-application#1125
(confidence 55%)
Later commit 043bc646 (raise a clear error for non-UTF-8 project files) touches the same YAML error path in craft_application/util/yaml.py.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #427 fix(yaml): wrap error message for YAML errors | craft-application | merged | Merged PR #427 (df906c31), wrapping YAML parsing failures in clearer YamlError diagnostics and fixing #407. |