aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author65432022-06-18 20:28:32 +0200
committerGitHub2022-06-18 20:28:32 +0200
commitadfb213211edfda438be0a29855e1f38914fdf35 (patch)
treec0f4a99560953fba99ed748ac3910e8b61181769
parent0231dad17343127cd6a66b081e5ec9d580391bfc (diff)
parent439ace607d23e91da4b39a389730ab8a01c4eb56 (diff)
Merge branch 'main' into feature-activitypub
-rw-r--r--modules/context/repo.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go
index 8e75ad07d..217cbd3df 100644
--- a/modules/context/repo.go
+++ b/modules/context/repo.go
@@ -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
}