Skip to content

Commit 68424ed

Browse files
adelowolunny
authored andcommitted
fix non existent milestone with 500 error (#7867) (#7873)
1 parent ab23e4b commit 68424ed

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

routers/repo/milestone.go

+5
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,11 @@ func MilestoneIssuesAndPulls(ctx *context.Context) {
253253
milestoneID := ctx.ParamsInt64(":id")
254254
milestone, err := models.GetMilestoneByID(milestoneID)
255255
if err != nil {
256+
if models.IsErrMilestoneNotExist(err) {
257+
ctx.NotFound("GetMilestoneByID", err)
258+
return
259+
}
260+
256261
ctx.ServerError("GetMilestoneByID", err)
257262
return
258263
}

0 commit comments

Comments
 (0)