<#10368 refactor: make `PluginNotFoundError` a `Me...
# meltano-repo-activity
g
#10368 refactor: make `PluginNotFoundError` a `MeltanoError` Pull request opened by ReubenFrankel Description
PluginNotFoundError
is now a
MeltanoError
, like the other errors that tell a user what went wrong. It stayed a plain
Exception
when
MeltanoError
arrived in
2.7.0
(#6748). Code that catches
MeltanoError
now catches it too, and the CLI prints it as it prints the others: the message, with no traceback. The CLI chains a plain exception into the error that it prints, and the log shows the chained traceback. A
MeltanoError
is printed without a chain. •
PluginNotFoundError
subclasses
MeltanoError
and sets its message as the reason, so the message now ends with a full stop like other errors. •
PluginDefinitionNotFoundError
puts the error's reason inside its own message, which has no full stop, so the combined message does not get two. •
PluginLockService.has_update
catches
MeltanoError
alone, which resolves the TODO from #10360. • A new test runs the CLI entry point with an unknown plugin and checks for the message, no traceback, and exit code 1. It fails without the change. The CLI and core test suites show no new failures. Behaviour changes • An unknown plugin gives the same message with a full stop at the end, the same exit code, and no traceback. • Code that catches
MeltanoError
now also catches
PluginNotFoundError
. In
src/meltano
, the only place that catches
MeltanoError
apart from the CLI entry point and
has_update
is
meltano hub ping
, which cannot raise this error. Checklist • I have read the contribution guide Was generative AI tooling used to co-author this PR? • Yes (please specify the tool below) Generated-by: Claude Code following the agentic coding guidelines Related Issues • None Summary by Sourcery Standardize plugin-not-found errors with Meltano's user-facing error handling. Bug Fixes: • Make unknown-plugin errors follow the standard Meltano CLI error handling, including a terminating full stop and no traceback. Enhancements: • Make PluginNotFoundError inherit from MeltanoError so it is consistently handled and caught across the application. • Simplify plugin update error handling and preserve the underlying plugin-not-found reason when reporting missing definitions. Tests: • Add CLI coverage verifying unknown plugins produce the expected message, exit code, and traceback behavior. --- 🤖 Generated with Claude Code meltano/meltano