diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2025-02-17 14:13:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-16 22:13:17 -0800 |
commit | f35850f48ed0bd40ec288e2547ac687a7bf1746c (patch) | |
tree | 27191daf6a2ca9e216710090bba303e26dafb157 /services/actions | |
parent | 69de5a65c25b08b501ed1e8123fcdad43f382213 (diff) | |
download | gitea-f35850f48ed0bd40ec288e2547ac687a7bf1746c.tar.gz gitea-f35850f48ed0bd40ec288e2547ac687a7bf1746c.zip |
Refactor error system (#33610)
Diffstat (limited to 'services/actions')
-rw-r--r-- | services/actions/workflow.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/actions/workflow.go b/services/actions/workflow.go index 4470b60c64..ab320aa453 100644 --- a/services/actions/workflow.go +++ b/services/actions/workflow.go @@ -104,13 +104,13 @@ func EnableOrDisableWorkflow(ctx *context.APIContext, workflowID string, isEnabl func ListActionWorkflows(ctx *context.APIContext) ([]*api.ActionWorkflow, error) { defaultBranchCommit, err := ctx.Repo.GitRepo.GetBranchCommit(ctx.Repo.Repository.DefaultBranch) if err != nil { - ctx.Error(http.StatusInternalServerError, "WorkflowDefaultBranchError", err.Error()) + ctx.APIError(http.StatusInternalServerError, err.Error()) return nil, err } entries, err := actions.ListWorkflows(defaultBranchCommit) if err != nil { - ctx.Error(http.StatusNotFound, "WorkflowListNotFound", err.Error()) + ctx.APIError(http.StatusNotFound, err.Error()) return nil, err } |