← Back to issue list

Bad error handling for shutil errors

View original Github issue

Metadata

Project
craft-application
Number
#939
Type
issue
State
open
Author
lengau
Labels
Status: Triaged Type: Bug
Created
Updated
Closed

Current evaluation

Poor error display for shutil errors during parts execution. Current code catches OSError in LifecycleService.run() and formats via PartsLifecycleError.from_os_error; referenced craft-parts#1366 is closed.

Suggested action: close stale

Reason: The issue is 321 days old with only a Jira-sync bot comment. The current codebase already handles this: lifecycle.py line 383 catches OSError (parent of shutil.Error) and converts it via PartsLifecycleError.from_os_error(), which formats filename and strerror into a user-friendly message. A unit test (test_parts_lifecycle_error_from_os_error) covers this path, and the referenced upstream craft-parts#1366 is closed, indicating the original trigger is resolved.

Impact: 40 Quick Win: 30.0 Staleness: 75 Complexity: 25 Confidence: 72 Support Request: 5

Issue body

### Bug Description When @upils discovered https://github.com/canonical/craft-parts/issues/1366, he also discovered that the display from craft-application was poor. We should catch those errors and display them properly. ### To Reproduce Raise a `shutil` error during parts ### part yaml ```shell ``` ### Relevant log output ```shell see: https://github.com/canonical/craft-parts/issues/1366 ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 40
Quick Win: 30.0
Staleness: 75
Complexity: 25
Confidence: 72
Support Request: 5
close stale Poor error display for shutil errors during parts execution. Current code catches OSError in LifecycleService.run() and formats via PartsLifecycleError.from_os_error; referenced craft-parts#1366 is closed.
qwen/qwen3.6-35b-a3b
Staleness: 70
Complexity: 30
Confidence: 85
Support Request: 5
keep open Triaged bug reporting poor error display for shutil exceptions during parts execution. Requires improved error catching and formatting in craft-application.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 30
Confidence: 75
Support Request: 10
keep open Tracks poor error display when shutil errors occur during parts execution. Triaged and linked to craft-parts#1366, but inactive for over eight months with no assignee or implementation progress.
qwen3.6-35b-a3b-mtp-q6
Staleness: 75
Complexity: 30
Confidence: 85
Support Request: 0
keep open Poor error handling for shutil errors during parts execution. Craft-application displays unhelpful messages instead of catching and formatting them properly. Status is triaged and awaiting implementation.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/craft-parts#1366 (confidence 90%)

    Upstream issue that triggered this one; reports unhandled error when organizing a file to an existing directory. Now closed.

Related issues

No related issues found above the similarity threshold.