Skip to content

Commit

Permalink
fix missing error msg (#1378)
Browse files Browse the repository at this point in the history
  • Loading branch information
sreway authored Apr 22, 2024
1 parent 8f7e4e3 commit 27275fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion atlassian/rest_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,9 @@ def raise_for_status(self, response):
else:
error_msg_list = j.get("errorMessages", list())
errors = j.get("errors", dict())
if isinstance(errors, dict):
if isinstance(errors, dict) and "message" not in errors:
error_msg_list.extend(errors.values())
elif isinstance(errors, dict) and "message" in errors:
error_msg_list.append(errors.get("message", ""))
elif isinstance(errors, list):
error_msg_list.extend([v.get("message", "") if isinstance(v, dict) else v for v in errors])
Expand Down

0 comments on commit 27275fe

Please sign in to comment.