Skip to content

Commit

Permalink
node_active_job: Improve http error handling
Browse files Browse the repository at this point in the history
Signed-off-by: Zack Cerza <[email protected]>
  • Loading branch information
Zack Cerza committed Feb 3, 2025
1 parent bb40519 commit f688892
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions teuthology/lock/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,9 @@ def node_active_job(name: str, status: Union[dict, None] = None) -> Union[str, N
if resp.ok:
job_status = resp.json()["status"]
break
elif resp.status_code == 404:
break
else:
log.debug(f"Error {resp.status_code} listing job {run_name}/{job_id} for {name}: {resp.text}")
if job_status and job_status not in ('pass', 'fail', 'dead'):
return description

0 comments on commit f688892

Please sign in to comment.