aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/compare.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/compare.go')
-rw-r--r--routers/api/v1/repo/compare.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/repo/compare.go b/routers/api/v1/repo/compare.go
index a1813a8a76..6d427c8073 100644
--- a/routers/api/v1/repo/compare.go
+++ b/routers/api/v1/repo/compare.go
@@ -47,7 +47,7 @@ func CompareDiff(ctx *context.APIContext) {
var err error
ctx.Repo.GitRepo, err = gitrepo.RepositoryFromRequestContextOrOpen(ctx, ctx.Repo.Repository)
if err != nil {
- ctx.Error(http.StatusInternalServerError, "OpenRepository", err)
+ ctx.APIErrorInternal(err)
return
}
}
@@ -82,7 +82,7 @@ func CompareDiff(ctx *context.APIContext) {
Files: files,
})
if err != nil {
- ctx.ServerError("toCommit", err)
+ ctx.APIErrorInternal(err)
return
}
apiCommits = append(apiCommits, apiCommit)