diff options
author | 赵智超 <1012112796@qq.com> | 2020-07-27 03:00:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-26 15:00:48 -0400 |
commit | 415fc8288ff9c83c99939003657db3c6ac978a3e (patch) | |
tree | a08fced01aa2cdcc25829108e5df6dddbd691a5e /routers | |
parent | d0c690f160b411cf83e3ee4c255cd3688578fdbb (diff) | |
download | gitea-415fc8288ff9c83c99939003657db3c6ac978a3e.tar.gz gitea-415fc8288ff9c83c99939003657db3c6ac978a3e.zip |
Show 404 page when release not found (#12328)
Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/release.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/repo/release.go b/routers/repo/release.go index 1845563bcf..3b8e55f002 100644 --- a/routers/repo/release.go +++ b/routers/repo/release.go @@ -134,6 +134,10 @@ func SingleRelease(ctx *context.Context) { release, err := models.GetRelease(ctx.Repo.Repository.ID, ctx.Params("tag")) if err != nil { + if models.IsErrReleaseNotExist(err) { + ctx.NotFound("GetRelease", err) + return + } ctx.ServerError("GetReleasesByRepoID", err) return } |