Use built-in exceptions for JDBC sqlalchemy connection extras - #70535
Open
mitre88 wants to merge 1 commit into
Open
Use built-in exceptions for JDBC sqlalchemy connection extras#70535mitre88 wants to merge 1 commit into
mitre88 wants to merge 1 commit into
Conversation
A wrong type for sqlalchemy_query is a TypeError and a missing sqlalchemy_scheme is a ValueError; both were raised as the broad AirflowException the community is actively reducing. Follows the clean-up pattern of apache#66279.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the ongoing clean-up of broad
AirflowExceptionusages (enforced by thecheck-no-new-airflow-exceptionsratchet), following the pattern of #66279.JdbcHook.sqlalchemy_urlraisedAirflowExceptionfor two input-validation failures in the connection extras: asqlalchemy_querythat is not a dict (nowTypeError) and a missingsqlalchemy_scheme(nowValueError). Theknown_airflow_exceptions.txtentry for the file drops from 2 to 0, and the two existing tests now assert the specific exception types and messages.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Fable 5) following the guidelines