Skip to content

Commit dd500ce

Browse files
authored
Fix Workflow run Not Found page (#34459)
Related: #34337 (comment) #34337 (comment)
1 parent b6bf128 commit dd500ce

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
@@ -611,20 +611,20 @@ func getRunJobs(ctx *context_module.Context, runIndex, jobIndex int64) (*actions
611611
run, err := actions_model.GetRunByIndex(ctx, ctx.Repo.Repository.ID, runIndex)
612612
if err != nil {
613613
if errors.Is(err, util.ErrNotExist) {
614-
ctx.HTTPError(http.StatusNotFound, err.Error())
614+
ctx.NotFound(nil)
615615
return nil, nil
616616
}
617-
ctx.HTTPError(http.StatusInternalServerError, err.Error())
617+
ctx.ServerError("GetRunByIndex", err)
618618
return nil, nil
619619
}
620620
run.Repo = ctx.Repo.Repository
621621
jobs, err := actions_model.GetRunJobsByRunID(ctx, run.ID)
622622
if err != nil {
623-
ctx.HTTPError(http.StatusInternalServerError, err.Error())
623+
ctx.ServerError("GetRunJobsByRunID", err)
624624
return nil, nil
625625
}
626626
if len(jobs) == 0 {
627-
ctx.HTTPError(http.StatusNotFound)
627+
ctx.NotFound(nil)
628628
return nil, nil
629629
}
630630

0 commit comments

Comments
 (0)