kalluripradeep commented on code in PR #64908:
URL: https://github.com/apache/airflow/pull/64908#discussion_r3067841830


##########
providers/fab/src/airflow/providers/fab/auth_manager/api_fastapi/routes/login.py:
##########
@@ -49,10 +49,9 @@ def _get_flask_app():
             ),
         )
     if not auth_manager.flask_app:
-        raise HTTPException(
-            status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
-            detail="Flask app is not initialized. Check that FabAuthManager 
started up correctly.",
-        )
+        from airflow.providers.fab.www.app import create_app
+
+        auth_manager.flask_app = create_app(enable_plugins=False)

Review Comment:
   Updated the logic to catch exceptions from create_app(), log them with a 
full traceback, and raise a structured 500 HTTPException. This prevents generic 
server errors and provides better diagnostic information in the logs.



-- 
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]

Reply via email to