← Back to issue list

fix: provide more info in YAML errors

View original Github issue

Metadata

Project
craft-application
Number
#433
Type
pull request
State
merged
Author
lengau
Labels
—
Created
Updated
Closed

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

No scores available.

Issue body

- [x] Have you followed the guidelines for contributing? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you successfully run `tox`? ----- Fixes the information disappearing from #427. Thanks @mattculler for pointing this out.

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.
71%