feat: Add more error logging
All checks were successful
Build Docker / Build Docker (push) Successful in 33s
All checks were successful
Build Docker / Build Docker (push) Successful in 33s
This commit is contained in:
parent
c45c34adb1
commit
cbe8996f7a
@ -447,6 +447,11 @@ def authorize():
|
|||||||
try:
|
try:
|
||||||
grant = authorization.get_consent_grant(end_user=user)
|
grant = authorization.get_consent_grant(end_user=user)
|
||||||
except OAuth2Error as error:
|
except OAuth2Error as error:
|
||||||
|
print(json.dumps({
|
||||||
|
"error": error.error,
|
||||||
|
"description": error.description,
|
||||||
|
"uri": error.uri,
|
||||||
|
}, indent=4),flush=True)
|
||||||
return jsonify({
|
return jsonify({
|
||||||
"error": error.error,
|
"error": error.error,
|
||||||
"description": error.description,
|
"description": error.description,
|
||||||
@ -516,7 +521,19 @@ def authUser():
|
|||||||
|
|
||||||
@bp.route("/oauth/token", methods=["POST"])
|
@bp.route("/oauth/token", methods=["POST"])
|
||||||
def issue_token():
|
def issue_token():
|
||||||
return authorization.create_token_response()
|
try:
|
||||||
|
return authorization.create_token_response()
|
||||||
|
except OAuth2Error as error:
|
||||||
|
print(json.dumps({
|
||||||
|
"error": error.error,
|
||||||
|
"description": error.description,
|
||||||
|
"uri": error.uri,
|
||||||
|
}, indent=4),flush=True)
|
||||||
|
return jsonify({
|
||||||
|
"error": error.error,
|
||||||
|
"description": error.description,
|
||||||
|
"uri": error.uri,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
@bp.route("/oauth/revoke", methods=["POST"])
|
@bp.route("/oauth/revoke", methods=["POST"])
|
||||||
|
Loading…
Reference in New Issue
Block a user