diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-19 15:08:27 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-19 15:08:27 +0300 |
commit | 4a44059e43feeef9e03fe99096de5035806c9f8f (patch) | |
tree | 4af11effe8e487422fe4dd1c815bd7635324415f /workhorse/internal/artifacts/entry.go | |
parent | 570f4d7ae78b453d9816f4f328bcd3941fbd0f37 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'workhorse/internal/artifacts/entry.go')
-rw-r--r-- | workhorse/internal/artifacts/entry.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/workhorse/internal/artifacts/entry.go b/workhorse/internal/artifacts/entry.go index 3ec3a559100..e2eef174989 100644 --- a/workhorse/internal/artifacts/entry.go +++ b/workhorse/internal/artifacts/entry.go @@ -16,8 +16,8 @@ import ( "gitlab.com/gitlab-org/labkit/log" "gitlab.com/gitlab-org/labkit/mask" - "gitlab.com/gitlab-org/gitlab/workhorse/internal/helper" "gitlab.com/gitlab-org/gitlab/workhorse/internal/helper/command" + "gitlab.com/gitlab-org/gitlab/workhorse/internal/helper/fail" "gitlab.com/gitlab-org/gitlab/workhorse/internal/senddata" "gitlab.com/gitlab-org/gitlab/workhorse/internal/zipartifacts" ) @@ -31,7 +31,7 @@ var SendEntry = &entry{"artifacts-entry:"} func (e *entry) Inject(w http.ResponseWriter, r *http.Request, sendData string) { var params entryParams if err := e.Unpack(¶ms, sendData); err != nil { - helper.Fail500(w, r, fmt.Errorf("SendEntry: unpack sendData: %v", err)) + fail.Request(w, r, fmt.Errorf("SendEntry: unpack sendData: %v", err)) return } @@ -42,7 +42,7 @@ func (e *entry) Inject(w http.ResponseWriter, r *http.Request, sendData string) }).Print("SendEntry: sending") if params.Archive == "" || params.Entry == "" { - helper.Fail500(w, r, fmt.Errorf("SendEntry: Archive or Entry is empty")) + fail.Request(w, r, fmt.Errorf("SendEntry: Archive or Entry is empty")) return } @@ -51,7 +51,7 @@ func (e *entry) Inject(w http.ResponseWriter, r *http.Request, sendData string) if os.IsNotExist(err) { http.NotFound(w, r) } else if err != nil { - helper.Fail500(w, r, fmt.Errorf("SendEntry: %v", err)) + fail.Request(w, r, fmt.Errorf("SendEntry: %v", err)) } } |