diff --git a/oar/api/routers/job.py b/oar/api/routers/job.py index de376468..d9d23f51 100644 --- a/oar/api/routers/job.py +++ b/oar/api/routers/job.py @@ -336,7 +336,7 @@ def submit( (error, job_id_lst) = submission.submit(db, config) if error[0] == -2: - raise HTTPException(status_code=418, detail=error[1]) + raise HTTPException(status_code=403, detail=error[1]) # TODO Enhance data = {} diff --git a/tests/api/test_job.py b/tests/api/test_job.py index c01f8197..5d9c9d82 100644 --- a/tests/api/test_job.py +++ b/tests/api/test_job.py @@ -675,4 +675,4 @@ def test_app_job_post_ar( job_ids = minimal_db_initialization.query(Job.id).all() assert job_ids == [] - assert res.status_code == 418 + assert res.status_code == 403