#37408: ValueError shadows import errors
-------------------------------------+-------------------------------------
Reporter: Johannes Maron | Type:
| Cleanup/optimization
Status: new | Component: Tasks
Version: 6.1 | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Regression from #36919
When a user renames or moves a task, deconstruction fails with an
ambiguous ValueError shadowing the `ImportError`.
https://github.com/django/django/blob/cf564bf3a7e0d92bc32292ccff1eca5aeb24b1ef/django/tasks/base.py#L64-L66
shadows ImportError.
Currently you'd need to access __causes__ to figure out that the
`ValueError` was actually because the tasks can't be found.
It would be more suitable to fail with a custom error, which backends
catch and handle more gracefully.
--
Ticket URL: <
https://code.djangoproject.com/ticket/37408>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.