← Back to issue list

Support craft_parts.PartsError as a complex object

View original Github issue

Metadata

Project
charmcraft
Number
#751
Type
issue
State
closed
Author
facundobatista
Labels
Created
Updated
Closed

Current evaluation

Superseded. Error formatting for craft_parts.PartsError will be handled during the craft-application migration instead of implementing custom error handling in charmcraft.

Suggested action:

No scores available.

Issue body

The Craft Parts library raises several errors that inherit its `PartsError`, whose `__str__` method just puts together the error message, details and resolution hints in several lines (concatenates all strings with `\n`). This looks ugly when we show the error. We need to get that object and build an also complex CraftError from the different `PartsError` attributes. Probably the simplest place to do this in a couple of points in `./charmcraft/parts.py`

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6 Superseded. Error formatting for craft_parts.PartsError will be handled during the craft-application migration instead of implementing custom error handling in charmcraft.
qwen/qwen3.6-35b-a3b Superseded by the craft-application migration. Improved PartsError formatting will be addressed during that migration rather than implemented directly in charmcraft.
qwen3.6-35b-a3b-mtp-q6 Closed as superseded by the craft-application migration. Error formatting improvements for craft_parts.PartsError will be addressed during that transition instead of implementing custom handling in charmcraft/parts.py.
qwen3.6-35b-a3b-mtp-q6 Closed as superseded. Improved formatting for craft_parts.PartsError will be handled during the craft-application migration instead of being implemented directly in charmcraft.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#176 parts: fix conversion of PartsError rockcraft merged Merged fix for PartsError conversion that previously used string representation to populate PartsLifecycleError messages, bypassing craft_cli verbosity controls. Fixes error handling to properly respect verbosity levels.
71%