From 53e6d0a48f6cc6ec4b051fcffc5494f8705cdd6e Mon Sep 17 00:00:00 2001 From: Viktxrrr Date: Wed, 22 Jan 2025 00:36:47 +0700 Subject: [PATCH] [Bitbucket] Fixed error_msg concatenation error in raise_for_status --- atlassian/bitbucket/cloud/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/atlassian/bitbucket/cloud/base.py b/atlassian/bitbucket/cloud/base.py index 69e89c245..ab6738ea0 100644 --- a/atlassian/bitbucket/cloud/base.py +++ b/atlassian/bitbucket/cloud/base.py @@ -113,7 +113,8 @@ def raise_for_status(self, response): e = j["error"] error_msg = e["message"] if e.get("detail"): - error_msg += "\n" + e["detail"] + # It uses interpolation instead of concatenation because of https://github.com/atlassian-api/atlassian-python-api/issues/1481 + error_msg = f"{error_msg}\n{e['detail']}" except Exception as e: log.error(e) response.raise_for_status()