Skip to content

Commit

Permalink
Fix formatting of steperror when utilizing errorutil.FormattedError (#77
Browse files Browse the repository at this point in the history
)
  • Loading branch information
vshah23 authored Mar 20, 2023
1 parent c5c206f commit db807a6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions step/steperror.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package step

import "errors"

// Error is an error occuring top level in a step
type Error struct {
StepID, Tag, ShortMsg string
Expand Down Expand Up @@ -34,3 +36,11 @@ func NewErrorWithRecommendations(stepID, tag string, err error, shortMsg string,
func (e *Error) Error() string {
return e.Err.Error()
}

func (e *Error) Unwrap() error {
if err := errors.Unwrap(e.Err); err != nil {
return err
}

return nil
}

0 comments on commit db807a6

Please sign in to comment.