From 6f10f906be9902618382fdef2adf9ad609cdc512 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Thu, 24 Oct 2024 11:54:29 -0600 Subject: [PATCH] provision.fog: Be more informative re: API errors Signed-off-by: Zack Cerza --- teuthology/provision/fog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/teuthology/provision/fog.py b/teuthology/provision/fog.py index 12914f296..101da2464 100644 --- a/teuthology/provision/fog.py +++ b/teuthology/provision/fog.py @@ -119,8 +119,8 @@ def do_request(self, url_suffix, data=None, method='GET', verify=True): ) prepped = req.prepare() resp = requests.Session().send(prepped) - if not resp.ok and resp.text: - self.log.error("%s: %s", resp.status_code, resp.text) + if not resp.ok: + self.log.error(f"Got status {resp.status_code} from {url_suffix}: '{resp.text}'") if verify: resp.raise_for_status() return resp