Skip to content

Commit

Permalink
provision.fog: Be more informative re: API errors
Browse files Browse the repository at this point in the history
Signed-off-by: Zack Cerza <[email protected]>
  • Loading branch information
zmc committed Oct 24, 2024
1 parent e2eb3a9 commit 6f10f90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions teuthology/provision/fog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6f10f90

Please sign in to comment.