diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 5bc17793f..4610d33ff 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -957,7 +957,9 @@ func UpdateIssueStatus(ctx *context.Context) { for _, issue := range issues { if err := issue.ChangeStatus(ctx.User, issue.Repo, isClosed); err != nil { if models.IsErrDependenciesLeft(err) { - ctx.Error(http.StatusPreconditionFailed, "", "cannot close this issue because it still has open dependencies") + ctx.JSON(http.StatusPreconditionFailed, map[string]interface{}{ + "error": "cannot close this issue because it still has open dependencies", + }) return } ctx.ServerError("ChangeStatus", err)