8000 fix(repositories): return error cause · ovh/cds@d31c153 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

Commit d31c153

Browse files
sguiheuxbnjjj
authored andcommitted
fix(repositories): return error cause
1 parent 56db730 commit d31c153

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

engine/repositories/processor.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ func (s *Service) do(op sdk.Operation) error {
4242
// Load workflow as code file
4343
case op.Setup.Checkout.Branch != "":
4444
if err := s.processCheckout(&op); err != nil {
45-
op.Error = err.Error()
45+
op.Error = sdk.Cause(err).Error()
4646
op.Status = sdk.OperationStatusError
4747
} else {
4848
op.Error = ""
4949
op.Status = sdk.OperationStatusDone
5050
switch {
5151
case op.LoadFiles.Pattern != "":
5252
if err := s.processLoadFiles(&op); err != nil {
53-
op.Error = err.Error()
53+
op.Error = sdk.Cause(err).Error()
5454
op.Status = sdk.OperationStatusError
5555
} else {
5656
op.Error = ""
@@ -64,7 +64,7 @@ func (s *Service) do(op sdk.Operation) error {
6464
// Push workflow as code file
6565
case op.Setup.Push.FromBranch != "":
6666
if err := s.processPush(&op); err != nil {
67-
op.Error = err.Error()
67+
op.Error = sdk.Cause(err).Error()
6868
op.Status = sdk.OperationStatusError
6969
} else 3CA8 {
7070
op.Error = ""

0 commit comments

Comments
 (0)
0