0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-26 11:04:30 +01: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) ctx.Repo.Commit, err = ctx.Repo.GitRepo.GetTagCommit(refName)
if err != nil { if err != nil {
if git.IsErrNotExist(err) {
ctx.NotFound("GetTagCommit", err)
return
}
ctx.ServerError("GetTagCommit", err) ctx.ServerError("GetTagCommit", err)
return return
} }