What
Handle the case where both run and clean fail, ensuring error information is not lost.
Goal
When a task's run method fails and subsequently the clean method also fails, both errors should be preserved and accessible for debugging. Currently, cleanup errors may shadow or obscure the original run error.
Approach
- Capture the original run error before executing cleanup
- If cleanup also fails, combine both errors in a way that preserves the root cause
- Options include: logging cleanup errors while re-raising run error, creating a composite error type, or storing cleanup errors separately for inspection
What
Handle the case where both
runandcleanfail, ensuring error information is not lost.Goal
When a task's
runmethod fails and subsequently thecleanmethod also fails, both errors should be preserved and accessible for debugging. Currently, cleanup errors may shadow or obscure the original run error.Approach