Raise serializable exception when loading invalid version for a workflow

Fixes https://github.com/galaxyproject/galaxy/issues/18438
This commit is contained in:
mvdbeek
2024-06-27 15:41:08 +02:00
parent 7d57020e7d
commit 983048805f
+1 -1
View File
@@ -7666,7 +7666,7 @@ class StoredWorkflow(Base, HasTags, Dictifiable, RepresentById, UsesCreateAndUpd
if version is None:
return self.latest_workflow
if len(self.workflows) <= version:
raise Exception("Version does not exist")
raise galaxy.exceptions.RequestParameterInvalidException("Version does not exist")
return list(reversed(self.workflows))[version]
def version_of(self, workflow):