Skip to content

Commit 8071b0f

Browse files
NorthRealmGiteaBot
authored andcommitted
Fix Workflow run Not Found page (go-gitea#34459)
Related: go-gitea#34337 (comment) go-gitea#34337 (comment)
1 parent a1dc3c9 commit 8071b0f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

routers/web/repo/actions/view.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -584,20 +584,20 @@ func getRunJobs(ctx *context_module.Context, runIndex, jobIndex int64) (*actions
584584
run, err := actions_model.GetRunByIndex(ctx, ctx.Repo.Repository.ID, runIndex)
585585
if err != nil {
586586
if errors.Is(err, util.ErrNotExist) {
587-
ctx.HTTPError(http.StatusNotFound, err.Error())
587+
ctx.NotFound(nil)
588588
return nil, nil
589589
}
590-
ctx.HTTPError(http.StatusInternalServerError, err.Error())
590+
ctx.ServerError("GetRunByIndex", err)
591591
return nil, nil
592592
}
593593
run.Repo = ctx.Repo.Repository
594594
jobs, err := actions_model.GetRunJobsByRunID(ctx, run.ID)
595595
if err != nil {
596-
ctx.HTTPError(http.StatusInternalServerError, err.Error())
596+
ctx.ServerError("GetRunJobsByRunID", err)
597597
return nil, nil
598598
}
599599
if len(jobs) == 0 {
600-
ctx.HTTPError(http.StatusNotFound)
600+
ctx.NotFound(nil)
601601
return nil, nil
602602
}
603603

0 commit comments

Comments
 (0)