diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go index be4e9711e74db..dc661249b576d 100644 --- a/routers/web/repo/pull.go +++ b/routers/web/repo/pull.go @@ -1434,8 +1434,7 @@ func CompareAndPullRequestPost(ctx *context.Context) { ctx.ServerError("CompareAndPullRequest.HTMLString", err) return } - ctx.Flash.Error(flashError) - ctx.JSONRedirect(pullIssue.Link()) // FIXME: it's unfriendly, and will make the content lost + ctx.JSONError(flashError) return } ctx.ServerError("NewPullRequest", err)