Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] /job/jobId/submit returns 404 instead of 401 if job is already in the queue #78

Open
taylorziegler opened this issue Dec 15, 2022 · 1 comment

Comments

@taylorziegler
Copy link
Contributor

The job route /job/jobId/submit returns a 404 response code instead of a 401 response code when a job that is already in the queue is submitted.

Expected Behavior

This route should return a 401 response code.

To Reproduce

config.get(f"/job/{helpers.get_user_jobid()}/submit")
response = config.get(f"/job/{helpers.get_user_jobid()}/submit")
assert response.status_code == 401
@alexandermichels alexandermichels added this to the v2.3 milestone Jan 24, 2023
@JTSIV1
Copy link
Contributor

JTSIV1 commented Feb 21, 2023

I think the issue is that /job/jobId/submit only has a defined POST route. When config.get is called the route doesn't exist and returns 404. If you change the command to config.post(f"/job/{helpers.get_user_jobid()}/submit") the status code will be 401 instead.

Suggested Change:
config.post(f"/job/{helpers.get_user_jobid()}/submit")
response = config.post(f"/job/{helpers.get_user_jobid()}/submit")
assert response.status_code == 401

@alexandermichels alexandermichels removed this from the v2.4 milestone Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants