Fix wrong error info in RepoRefForAPI (#24344) (#24351)

Backport #24344 by @yp05327

Co-authored-by: yp05327 <576951401@qq.com>
(cherry picked from commit af5d66b341)
This commit is contained in:
Giteabot 2023-04-26 05:07:51 -04:00 committed by Earl Warren
parent b67b51d0bb
commit d3f3924164
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -344,7 +344,7 @@ func RepoRefForAPI(next http.Handler) http.Handler {
if git.IsErrNotExist(err) {
ctx.NotFound()
} else {
ctx.Error(http.StatusInternalServerError, "GetBlobByPath", err)
ctx.Error(http.StatusInternalServerError, "GetCommit", err)
}
return
}