pierrejeambrun commented on code in PR #64219:
URL: https://github.com/apache/airflow/pull/64219#discussion_r2996210713
##########
airflow-core/src/airflow/api_fastapi/core_api/security.py:
##########
@@ -123,6 +127,9 @@ async def resolve_user_from_token(token_str: str | None) ->
BaseUser:
raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED,
detail="Token Expired")
except InvalidTokenError:
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN,
detail="Invalid JWT token")
+ except Exception:
+ log.exception("Unexpected error during token authentication")
Review Comment:
That sounds fair. So we can catch this particular exception and handle it as
a 400. (in opposition to catching everything)
--
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]