Fix 500 Internal Server Error when JWT user does not exist in FabAuth…#61517
Merged
Conversation
uranusjr
approved these changes
Feb 10, 2026
shahar1
approved these changes
Feb 10, 2026
Contributor
There was a problem hiding this comment.
LGTM! I added unit tests to avoid possible regressions in the future (used GitHub Copilot for generating).
Please note to add unit tests in your next PRs (I assisted this time as I want to include this PR in the upcoming release that I cut very soon)
81 tasks
Alok-kumar-priyadarshi
pushed a commit
to Alok-kumar-priyadarshi/airflow
that referenced
this pull request
Feb 11, 2026
apache#61517) Co-authored-by: zhuoyuchen <> Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com>
Ratasa143
pushed a commit
to Ratasa143/airflow
that referenced
this pull request
Feb 15, 2026
apache#61517) Co-authored-by: zhuoyuchen <> Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com>
choo121600
pushed a commit
to choo121600/airflow
that referenced
this pull request
Feb 22, 2026
apache#61517) Co-authored-by: zhuoyuchen <> Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com>
AkshayArali
pushed a commit
to AkshayArali/airflow_630
that referenced
this pull request
Feb 27, 2026
apache#61517) Co-authored-by: zhuoyuchen <> Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com>
AkshayArali
pushed a commit
to AkshayArali/airflow_630
that referenced
this pull request
Feb 27, 2026
apache#61517) Co-authored-by: zhuoyuchen <> Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com>
Subham-KRLX
pushed a commit
to Subham-KRLX/airflow
that referenced
this pull request
Mar 4, 2026
apache#61517) Co-authored-by: zhuoyuchen <> Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com>
dominikhei
pushed a commit
to dominikhei/airflow
that referenced
this pull request
Mar 11, 2026
apache#61517) Co-authored-by: zhuoyuchen <> Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com>
Ankurdeewan
pushed a commit
to Ankurdeewan/airflow
that referenced
this pull request
Mar 15, 2026
apache#61517) Co-authored-by: zhuoyuchen <> Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com>
radhwene
pushed a commit
to radhwene/airflow
that referenced
this pull request
Mar 21, 2026
apache#61517) Co-authored-by: zhuoyuchen <> Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com>
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.
Description
When using
FabAuthManager, if a request contains a valid JWT token but the user ID inside the token (subclaim) does not exist in the database (e.g., the user was deleted),deserialize_userexecutesself.session.scalars(...).one(), which raises asqlalchemy.exc.NoResultFoundexception.Currently, this exception is unhandled, causing the API to crash with a
500 Internal Server Error.Error log:
Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.