CreateWorkerRun raises HTTP 404 instead of 400 for an unavailable WorkerVersion
While testing our existing unavailable version checks for #1406 (closed), I noticed that CreateWorkerRun
causes an HTTP 404 when creating a run on a process that does exist, with a worker version that does exist, but that is unavailable. The error message only includes Not Found
, without stating that this error comes from the version at all.
Creating a run on an existing process with a worker version that does not exist correctly causes a HTTP 400 with {'worker_version_id': ['This version does not exist.']}
, so this is solely related to the version not being available or not having a docker_image
.
This should instead cause a 400 error with {'worker_version_id': ['This worker version is not in an Available state.']}
.