From: Lanre Adelowo Date: Thu, 15 Aug 2019 01:37:59 +0000 (+0100) Subject: fix non existent milestone with 500 error (#7867) (#7873) X-Git-Tag: v1.9.2~6 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=68424eddf097f373d134b59264c86c6ecd80e7fb;p=gitea.git fix non existent milestone with 500 error (#7867) (#7873) --- 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 }