Add additional debugging

This commit is contained in:
Mart van Santen 2022-04-01 16:58:11 +08:00
parent e97d82c6f0
commit e5cb358f39

View file

@ -245,6 +245,9 @@ def consent():
app_id = consent_client.get('client_id') app_id = consent_client.get('client_id')
# False positive: pylint: disable=no-member # False positive: pylint: disable=no-member
kratos_id = consent_request.subject kratos_id = consent_request.subject
current_app.logger.error(f"Info: Found kratos_id {kratos_id"})
current_app.logger.error(f"Info: Found app_id {app_id"})
except Exception as error: except Exception as error:
current_app.logger.error(f"Error: Unable to extract information from consent request") 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"Error: {error}")
@ -253,6 +256,7 @@ def consent():
abort(501, description="Internal error occured") abort(501, description="Internal error occured")
# Get the related user object # Get the related user object
current_app.logger.error(f"Info: Getting user from admin {kratos_id}")
user = KratosUser(KRATOS_ADMIN, kratos_id) user = KratosUser(KRATOS_ADMIN, kratos_id)
if not user: if not user:
current_app.logger.error(f"User not found in database: {kratos_id}") current_app.logger.error(f"User not found in database: {kratos_id}")