From 33556c671f53c9eed7676d053269d21d1ff15d36 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 7 Jun 2024 09:35:58 +0200 Subject: [PATCH] Raise appropriate exception if require path parameter is missing --- lib/galaxy/webapps/galaxy/api/job_files.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/galaxy/webapps/galaxy/api/job_files.py b/lib/galaxy/webapps/galaxy/api/job_files.py index 74c25e07ea35..3bae6d62d137 100644 --- a/lib/galaxy/webapps/galaxy/api/job_files.py +++ b/lib/galaxy/webapps/galaxy/api/job_files.py @@ -99,6 +99,8 @@ def create(self, trans, job_id, payload, **kwargs): """ job = self.__authorize_job_access(trans, job_id, **payload) path = payload.get("path") + if not path: + raise exceptions.RequestParameterInvalidException("'path' parameter not provided or empty.") self.__check_job_can_write_to_path(trans, job, path) # Is this writing an unneeded file? Should this just copy in Python?