From 8d3d074e4f537db81fc0bba61d83d5533c3acc96 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Tue, 14 Apr 2026 21:35:23 +0200 Subject: [PATCH] try fix edge cases --- routers/api/v1/repo/action.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routers/api/v1/repo/action.go b/routers/api/v1/repo/action.go index 5be2ae9c50..7f798b4d7e 100644 --- a/routers/api/v1/repo/action.go +++ b/routers/api/v1/repo/action.go @@ -22,6 +22,7 @@ import ( repo_model "code.gitea.io/gitea/models/repo" secret_model "code.gitea.io/gitea/models/secret" "code.gitea.io/gitea/modules/actions" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/httplib" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" @@ -1037,7 +1038,7 @@ func ActionsListWorkflowRuns(ctx *context.APIContext) { } if !runExists { if _, err := convert.GetActionWorkflow(ctx, ctx.Repo.GitRepo, ctx.Repo.Repository, workflowID); err != nil { - if errors.Is(err, util.ErrNotExist) { + if errors.Is(err, util.ErrNotExist) || git.IsErrNotExist(err) { ctx.APIError(http.StatusNotFound, err) } else { ctx.APIErrorInternal(err)