Skip to content

Commit 2cf2423

Browse files
author
Gusted
committed
Merge pull request 'Minor cleanup in ViewLatestWorkflowRun' (go-gitea#2343) from algernon/b/actions/view-latest-run-for-workflow/ctx.ServerError into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2343 Reviewed-by: Gusted <[email protected]>
2 parents 2d321d2 + 8075721 commit 2cf2423

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

routers/web/repo/actions/view.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
"code.gitea.io/gitea/modules/actions"
2323
"code.gitea.io/gitea/modules/base"
2424
context_module "code.gitea.io/gitea/modules/context"
25-
"code.gitea.io/gitea/modules/log"
2625
"code.gitea.io/gitea/modules/storage"
2726
"code.gitea.io/gitea/modules/timeutil"
2827
"code.gitea.io/gitea/modules/util"
@@ -75,8 +74,7 @@ func ViewLatestWorkflowRun(ctx *context_module.Context) {
7574
if errors.Is(err, util.ErrNotExist) {
7675
ctx.NotFound("GetLatestRunForBranchAndWorkflow", err)
7776
} else {
78-
log.Error("GetLatestRunForBranchAndWorkflow: %v", err)
79-
ctx.Error(http.StatusInternalServerError, "Unable to get latest run for workflow on branch")
77+
ctx.ServerError("GetLatestRunForBranchAndWorkflow", err)
8078
}
8179
return
8280
}

0 commit comments

Comments
 (0)