lang: Remove some error wrapping

Makes errors cleaner to read. The extra context wasn't very helpful.
This commit is contained in:
James Shubin
2024-08-18 19:07:27 -04:00
parent 6f3c3c318b
commit 001e1a5da0
2 changed files with 2 additions and 3 deletions

View File

@@ -35,7 +35,6 @@ import (
"github.com/purpleidea/mgmt/lang/interfaces"
"github.com/purpleidea/mgmt/lang/types"
"github.com/purpleidea/mgmt/util/errwrap"
)
var _ interfaces.Func = &Func{} // ensure it meets this expectation
@@ -154,7 +153,7 @@ func (obj *Func) Stream(ctx context.Context) error {
if obj.init.Debug {
obj.init.Logf("Function returned error: %+v", err)
}
return errwrap.Wrapf(err, "wrapped function errored")
return err
}
if obj.init.Debug {
obj.init.Logf("Function returned with: %+v", result)