diff --git a/routers/web/repo/actions/view.go b/routers/web/repo/actions/view.go index e17d6b42d7a..07a7187955e 100644 --- a/routers/web/repo/actions/view.go +++ b/routers/web/repo/actions/view.go @@ -1072,7 +1072,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 }