diff options
author | Lanre Adelowo <yo@lanre.wtf> | 2019-08-15 00:43:50 +0100 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2019-08-14 19:43:50 -0400 |
commit | a315c8d9924846498ab6f9d24446f0d3456f0597 (patch) | |
tree | 499b9cca5d3c0f0be15b1c24600b4a327399d554 /routers/repo | |
parent | 14230ca843faf68920cd28bd5601547c1ad3a4a9 (diff) | |
download | gitea-a315c8d9924846498ab6f9d24446f0d3456f0597.tar.gz gitea-a315c8d9924846498ab6f9d24446f0d3456f0597.zip |
fix non existent milestone with 500 error (#7867)
Diffstat (limited to 'routers/repo')
-rw-r--r-- | routers/repo/milestone.go | 5 |
1 files changed, 5 insertions, 0 deletions
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 } |