Surface databricks API errors as a separate exception#69019
Merged
amoghrajesh merged 1 commit intoJun 26, 2026
Conversation
amoghrajesh
requested review from
ashb,
bugraoz93,
gopidesupavan,
jason810496,
jscheffl and
potiuk
as code owners
June 26, 2026 08:15
1 task
shahar1
approved these changes
Jun 26, 2026
Contributor
Author
|
@shahar1's approval is valuable here, we were discussing about |
Contributor
Backport successfully created: v3-3-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
Contributor
Author
|
Wrong backport! |
1 task
Member
Fix in #69057 |
karenbraganz
pushed a commit
to karenbraganz/airflow
that referenced
this pull request
Jun 30, 2026
75 tasks
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.
Was generative AI tooling used to co-author this PR?
Related to #68974 (comment)
What
DatabricksHook._do_api_call/_a_do_api_callflattened every HTTP error into a bareAirflowExceptionwhose only detail was a formatted message string. Callers that need to react to a specific response (e.g. a404for a run whose history has expired) had no structured way to do so short of parsing that string which is brittle.Change
Introduces
DatabricksApiError(AirflowException)carryinghttp_status_code, and raises it (with the original error chained viafrom) from both the sync and async API call pathBackcompat
Fully backcompatible:
DatabricksApiErroris anAirflowExceptionsubclass, and nothing catches these errors by a more specific type today, so existing behavior andpytest.raises(AirflowException)assertions are unchanged. It also removes tworaise AirflowException{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.