1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00

Return 404 when tag is broken (#20017)

Fixes #19979
This commit is contained in:
Wim 2022-06-18 19:08:34 +02:00 committed by GitHub
parent 433443ffa9
commit 439ace607d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -942,6 +942,10 @@ func RepoRefByType(refType RepoRefType, ignoreNotExistErr ...bool) func(*Context
ctx.Repo.Commit, err = ctx.Repo.GitRepo.GetTagCommit(refName)
if err != nil {
if git.IsErrNotExist(err) {
ctx.NotFound("GetTagCommit", err)
return
}
ctx.ServerError("GetTagCommit", err)
return
}