Skip to content

Commit

Permalink
Show 404 page when release not found (#12328)
Browse files Browse the repository at this point in the history
Signed-off-by: a1012112796 <[email protected]>

Co-authored-by: Lunny Xiao <[email protected]>
  • Loading branch information
a1012112796 and lunny authored Jul 26, 2020
1 parent d0c690f commit 415fc82
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions routers/repo/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 415fc82

Please sign in to comment.