Skip to content

Commit

Permalink
Fetch message for authlib errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
fredmanglis committed Apr 24, 2024
1 parent 74ff470 commit 5474e66
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gn2/wqflask/oauth2/request_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ def process_error(error: Response,
if error.status_code in range(400, 500):
try:
err = error.json()
msg = err.get("error_description", f"{error.reason}")
msg = error.get(
"error", err.get("error_description", f"{error.reason}"))
except simplejson.errors.JSONDecodeError as _jde:
msg = message
return {
Expand Down

0 comments on commit 5474e66

Please sign in to comment.