Guy-Lev opened a new pull request, #64219: URL: https://github.com/apache/airflow/pull/64219
`resolve_user_from_token` only caught `ExpiredSignatureError` and `InvalidTokenError`. Any other exception from the token validation pipeline resulted in the API returning a 500 Internal Server Error instead of a proper 401. Added a catch-all `except Exception` with logging so unexpected auth errors return 401 instead of 500. ##### Was generative AI tooling used to co-author this PR? <!-- If generative AI tooling has been used in the process of authoring this PR, please change below checkbox to `[X]` followed by the name of the tool, uncomment the "Generated-by". --> - [ ] Yes (please specify the tool below) <!-- Generated-by: [Tool Name] following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) --> --- -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
