Skip to content

Commit 85ae996

Browse files
committed
Raise RequestParameterInvalidException if workflow version is not an int
1 parent a91368d commit 85ae996

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/galaxy/webapps/galaxy/api/workflows.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,10 @@ def workflow_dict(self, trans: GalaxyWebTransaction, workflow_id, **kwd):
344344
download_format = kwd.get("format")
345345
version = kwd.get("version")
346346
if version is not None:
347-
version = int(version)
347+
try:
348+
version = int(version)
349+
except ValueError:
350+
raise exceptions.RequestParameterInvalidException("Invalid version specified.")
348351
history = None
349352
if history_id := kwd.get("history_id"):
350353
history = self.history_manager.get_accessible(

0 commit comments

Comments
 (0)