feat: target workflow runs by tag selector

This commit is contained in:
2026-08-04 13:36:43 +01:00
parent e00a0da5d9
commit d1b3cd2f74
4 changed files with 18 additions and 13 deletions
+4
View File
@@ -343,6 +343,10 @@ func deleteWorkflow(c *gin.Context) {
func runWorkflow(c *gin.Context) {
runID, err := services.TriggerWorkflow(auth.InstanceID(c), c.Param("id"), actorFromCtx(c))
if err != nil {
if errors.Is(err, services.ErrNoTargets) {
c.JSON(http.StatusBadRequest, gin.H{"error": "this workflow matches no servers"})
return
}
c.JSON(http.StatusServiceUnavailable, gin.H{"error": err.Error()})
return
}