Skip to content

Commit

Permalink
fix non existent milestone with 500 error
Browse files Browse the repository at this point in the history
  • Loading branch information
adelowo committed Aug 14, 2019
1 parent 14230ca commit 61283b1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions routers/repo/milestone.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@ func MilestoneIssuesAndPulls(ctx *context.Context) {
milestoneID := ctx.ParamsInt64(":id")
milestone, err := models.GetMilestoneByID(milestoneID)
if err != nil {
if models.IsErrMilestoneNotExist(err) {
ctx.NotFound("GetMilestoneByID", err)
return
}

ctx.ServerError("GetMilestoneByID", err)
return
}
Expand Down

0 comments on commit 61283b1

Please sign in to comment.