File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -21,4 +21,4 @@ def test_update_job_raises_job_deleted_exception(mock_put):
2121 with pytest .raises (JobDeletedException ) as exc_info :
2222 update_job (job_id , JobStates .running )
2323
24- assert " it was probably deleted by the user" in str (exc_info .value )
24+ assert f"Job { job_id } not found; it was probably deleted by the user. " in str (exc_info .value )
Original file line number Diff line number Diff line change @@ -510,7 +510,7 @@ def _update_job_status(
510510 # job probably deleted by user
511511 session .delete (job )
512512 session .commit ()
513- raise JobDeletedException ( f"Could not update job, probably deleted by user: { e } " )
513+ raise e from e
514514
515515 def update_job_status (
516516 self ,
Original file line number Diff line number Diff line change @@ -20,5 +20,5 @@ def update_job(
2020 headers = {"x-api-key" : settings .internal_api_key_secret },
2121 )
2222 if resp .status_code == 404 :
23- raise JobDeletedException (" it was probably deleted by the user" )
23+ raise JobDeletedException (f"Job { job_id } not found; it was probably deleted by the user. " )
2424 resp .raise_for_status ()
You can’t perform that action at this time.
0 commit comments