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 53a02c3 commit 04f10df
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 @@ -42,7 +42,8 @@ def process_error(error: Response,
try:
err = error.json()
app.logger.debug("Error JSON: %s", err)
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 04f10df

Please sign in to comment.