sources: proper errors for invalid handlers
Metadata
Current evaluation
Merged PR #1929 as 5defd5d5e, adding SnapcraftError-derived errors for unhandled source handlers and resolving LP #1741952.
Resolution: closed resolved
Reason: PR #1929 was merged as commit 5defd5d5e, adding proper error classes for unhandled source handlers.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)?
- [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh unit`?
-----
Add proper error classes for unhandled sources derived from SnapcraftError.
Fixes: [LP: #1741952](https://bugs.launchpad.net/snapcraft/+bug/1741952)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1929 as 5defd5d5e, adding SnapcraftError-derived errors for unhandled source handlers and resolving LP #1741952. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged as commit 5defd5d5, adding SnapcraftError-derived errors for unhandled sources and resolving LP #1741952. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged implementation of proper error classes for invalid sources, resolving Launchpad bug #1741952. Schema validation handles invalid source-types, so additional error handling was unnecessary. Approved, passed CI, and merged. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Adds proper error classes for unhandled sources, resolving Launchpad bug #1741952. A reviewer suggested catching KeyError for invalid source-types, but schema validation already handles it. Approved by maintainers. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1649569 Make plugin/source error reporting a bit more useful | snapcraft (launchpad) | closed | Merged PR snapcore/snapcraft#958 added the source value to invalid-handler errors, making “no handler to manage source” identify the unrecognized source. | |
| #1741952 Unhandled source type provides traceback | snapcraft (launchpad) | closed | Unhandled source types now produce a proper Snapcraft error instead of a traceback, fixed by snapcore/snapcraft#1929 (5defd5d5e). |