diff --git a/atlassian/rest_client.py b/atlassian/rest_client.py index 2186b04f9..c2b36b09d 100644 --- a/atlassian/rest_client.py +++ b/atlassian/rest_client.py @@ -392,7 +392,7 @@ def raise_for_status(self, response): if 400 <= response.status_code < 600: try: j = response.json() - error_msg = "\n".join(j["errorMessages"] + [k + ": " + v for k, v in j["errors"].items()]) + error_msg = "\n".join(j.get("errorMessages", list()) + [k + ": " + v for k, v in j.get("errors", dict()).items()]) except Exception: response.raise_for_status() else: