diff --git a/routers/web/repo/fork.go b/routers/web/repo/fork.go index dd15fc845e..9f5cda10c2 100644 --- a/routers/web/repo/fork.go +++ b/routers/web/repo/fork.go @@ -151,7 +151,7 @@ func ForkPost(ctx *context.Context) { ctx.Data["ContextUser"] = ctxUser if ctx.HasError() { - ctx.JSONError(tplFork) + ctx.JSONError(ctx.GetErrMsg()) return } @@ -184,7 +184,7 @@ func ForkPost(ctx *context.Context) { ctx.ServerError("CanCreateOrgRepo", err) return } else if !isAllowedToFork { - ctx.JSONError(http.StatusForbidden) + ctx.HTTPError(http.StatusForbidden) return } }