diff --git a/routers/web/repo/actions/view.go b/routers/web/repo/actions/view.go index 67f36d68b5..b6984567e5 100644 --- a/routers/web/repo/actions/view.go +++ b/routers/web/repo/actions/view.go @@ -49,14 +49,12 @@ func View(ctx *context_module.Context) { func ViewLatest(ctx *context_module.Context) { run, err := actions_model.GetLatestRun(ctx, ctx.Repo.Repository.ID) if err != nil { - ctx.Error(http.StatusNotFound, err.Error()) - ctx.Written() + ctx.NotFound("GetLatestRun", err) return } err = run.LoadAttributes(ctx) if err != nil { - ctx.Error(http.StatusInternalServerError, err.Error()) - ctx.Written() + ctx.ServerError("LoadAttributes", err) return } ctx.Redirect(run.HTMLURL(), http.StatusTemporaryRedirect)