From 047b34bfc7052bb68bca8c9d3d8cef3c672af2e6 Mon Sep 17 00:00:00 2001 From: Mart van Santen Date: Fri, 1 Apr 2022 15:37:56 +0800 Subject: [PATCH] Add debugging --- areas/login/login.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/areas/login/login.py b/areas/login/login.py index d4366d8..659efe7 100644 --- a/areas/login/login.py +++ b/areas/login/login.py @@ -234,9 +234,16 @@ def consent(): # Get information about this consent request: # False positive: pylint: disable=no-member - app_id = consent_request.client.client_id - # False positive: pylint: disable=no-member - kratos_id = consent_request.subject + try: + app_id = consent_request.client.client_id + # False positive: pylint: disable=no-member + kratos_id = consent_request.subject + except Exception as e: + current_app.logger.error(f"Error: Unable to extract information from consent request") + current_app.logger.error(f"Error: {error}") + current_app.logger.error(f"Client: {consent_request.client}") + current_app.logger.error(f"Subject: {consent_request.subject}") + abort(501, description="Internal error occured" # Get the related user object user = KratosUser(KRATOS_ADMIN, kratos_id)