diff --git a/routers/web/repo/actions/view.go b/routers/web/repo/actions/view.go index f92df685fd..954abc65ce 100644 --- a/routers/web/repo/actions/view.go +++ b/routers/web/repo/actions/view.go @@ -949,7 +949,7 @@ func EnableWorkflowFile(ctx *context_module.Context) { func disableOrEnableWorkflowFile(ctx *context_module.Context, isEnable bool) { workflow := ctx.FormString("workflow") if len(workflow) == 0 { - ctx.ServerError("workflow", nil) + ctx.JSONError("workflow is required") return }