From 68424eddf097f373d134b59264c86c6ecd80e7fb Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Thu, 15 Aug 2019 02:37:59 +0100 Subject: [PATCH] fix non existent milestone with 500 error (#7867) (#7873) --- routers/repo/milestone.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/routers/repo/milestone.go b/routers/repo/milestone.go index 3ad638e60a..5b8a5faa33 100644 --- a/routers/repo/milestone.go +++ b/routers/repo/milestone.go @@ -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 } -- 2.39.5