Skip to content

Commit

Permalink
routes/kill.py: log error for HTTPException
Browse files Browse the repository at this point in the history
Errors are logged for HTTPError and Exception,
also log them for HTTPException before raising
the exception.

Signed-off-by: Vallari Agrawal <[email protected]>
  • Loading branch information
VallariAg committed Nov 26, 2024
1 parent 8f8ea00 commit eb62170
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/teuthology_api/routes/kill.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ async def create_run(
try:
args = args.model_dump(by_alias=True, exclude_unset=True)
return await run(args, logs, token, request)
except HTTPException:
except HTTPException as http_exp:
log.error(http_exp)
raise
except HTTPError as http_err:
log.error(http_err)
Expand Down

0 comments on commit eb62170

Please sign in to comment.