Skip to content
Snippets Groups Projects
Commit 96b30e53 authored by Mark's avatar Mark
Browse files

Fix Typo in exception handling

parent 52fe704e
No related branches found
No related tags found
1 merge request!7Integration user panel
......@@ -2,6 +2,7 @@ from flask import abort, Flask, redirect, request
from flask.views import View
from os import urandom, environ
from hydra_client import HydraAdmin
import hydra_client
from db import User, BackendConnectionError
import logging
......@@ -33,10 +34,10 @@ def home():
try:
consent_request = HYDRA.consent_request(challenge)
except hydra_client.exceptions.NotFound:
app.logger.error("Not Found. Login request not found. challenge={0}".format(challenge))
app.logger.error("Not Found. Consent request not found. challenge={0}".format(challenge))
abort(404)
except hydra_client.exceptions.HTTPError:
app.logger.error("Conflict. Login request has been used already. challenge={0}".format(challenge))
app.logger.error("Conflict. Consent request has been used already. challenge={0}".format(challenge))
abort(503)
app_name = consent_request.client.client_name
username = consent_request.subject
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment