Skip to content

Commit

Permalink
Return 404 when tag is broken
Browse files Browse the repository at this point in the history
  • Loading branch information
42wim committed Jun 18, 2022
1 parent 433443f commit 48dec04
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/context/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 48dec04

Please sign in to comment.