From b42b065eb62f9508405d4c947e000b74b7b84bab Mon Sep 17 00:00:00 2001 From: pshingavi Date: Sat, 9 Sep 2023 13:59:39 -0500 Subject: [PATCH] [ISSUE-1242] prevented weird exceptions related to integer handling if keys or values in the response json are `int`s, the `k + ": " + v` will fail because of an `int` is not a `str`. In order to avoid this, we can either use `%`-formatting, `.format` formatting, or f-strings. We chose `.format` for compatability, but regardless of which direction, the issue should be addressed one of those ways. --- atlassian/rest_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atlassian/rest_client.py b/atlassian/rest_client.py index 944103cd7..4049c91be 100644 --- a/atlassian/rest_client.py +++ b/atlassian/rest_client.py @@ -477,7 +477,7 @@ def raise_for_status(self, response): try: j = response.json() if self.url == "https://api.atlassian.com": - error_msg = "\n".join([k + ": " + v for k, v in j.items()]) + error_msg = "\n".join(["{}: {}".format(k, v) for k, v in j.items()]) else: error_msg_list = j.get("errorMessages", list()) errors = j.get("errors", dict())