fix(errors): render user-config and base-alias failures as structured errors
Metadata
Current evaluation
Maps Pydantic validation and BuilddBaseAlias failures to structured config errors and appropriate exit codes. All CI passes and two reviewers approved, but 11 comments remain unresolved.
Suggested action: needs review
Reason: All reported checks pass and two reviewers approved the 118/-2-line error-handling change. However, 11 review comments remain unresolved and there has been no activity for 81 days, so maintainers should resolve or dismiss the comments and perform final re-review before merge.
Evaluated by: mr-cal-bot
Impact:
48
Quick Win:
19
Complexity:
35
Confidence:
92
Actionability:
62
Issue body
Unhandled pydantic `ValidationError`s and host base-alias lookup failures fall through to the generic handler and are reported as '<app> internal error: ...' with exit code 70, leaking a raw Python / pydantic traceback (including the errors.pydantic.dev link) for what are plainly user configuration problems.
This PR changes `handle_runtime_error` to convert pydantic.ValidationError into a structured `CraftValidationError` with a 'Recommended resolution' (exit `EX_DATAERR`), and surfaces 'not a valid BuilddBaseAlias' `ValueError`s as a structured config error (exit `EX_CONFIG`). `pydantic.ValidationError` is a `ValueError` subclass, so it is matched first. A TODO marks a potential deeper fix for the base-alias lookup site.
- [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 `make lint && make test`? (I only get the same failures as main).
- [x] Have you added an entry to the changelog (`docs/reference/changelog.rst`)?
---
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha |
Impact:
48
Quick Win:
19
Complexity:
35
Confidence:
92
Actionability:
62
|
needs review | Maps Pydantic validation and BuilddBaseAlias failures to structured config errors and appropriate exit codes. All CI passes and two reviewers approved, but 11 comments remain unresolved. | |
| stealth/space-bunny-alpha |
Impact:
42
Quick Win:
19
Complexity:
27
Confidence:
80
Actionability:
63
|
needs review | Approved error-handling update maps Pydantic validation and BuilddBaseAlias failures to structured errors; all reported CI checks pass, but 11 review comments remain. | |
| qwen3.6-35b-a3b-mtp-q6 |
Impact:
45
Quick Win:
34
Staleness:
65
Complexity:
25
Confidence:
75
|
needs review | Converts pydantic ValidationError and base-alias lookup failures into structured CraftValidationError with user-friendly messages instead of raw tracebacks. Approved by 2 reviewers but has 11 unresolved review comments and 53 days of inactivity. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
45
Complexity:
15
Confidence:
85
|
needs review | Converts unhandled pydantic validation errors and base-alias lookup failures into structured user-facing errors with recommended resolutions. Currently approved by two reviewers but has 11 unresolved comments and awaits author response to a recent review request. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
45
Complexity:
25
Confidence:
90
|
needs review | Converts unhandled pydantic validation and base-alias lookup errors into structured user-facing messages with appropriate exit codes, replacing raw Python tracebacks. Currently awaiting maintainer review. |
Update history
No update history recorded yet.
Related issues
No related issues found above the similarity threshold.