diff options
Diffstat (limited to 'pkg/bindings/errors.go')
-rw-r--r-- | pkg/bindings/errors.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/bindings/errors.go b/pkg/bindings/errors.go index eb95764ba..29f087c22 100644 --- a/pkg/bindings/errors.go +++ b/pkg/bindings/errors.go @@ -2,10 +2,11 @@ package bindings import ( "encoding/json" + "errors" + "fmt" "io/ioutil" "github.com/containers/podman/v4/pkg/errorhandling" - "github.com/pkg/errors" ) var ( @@ -30,7 +31,7 @@ func (h APIResponse) Process(unmarshalInto interface{}) error { func (h APIResponse) ProcessWithError(unmarshalInto interface{}, unmarshalErrorInto interface{}) error { data, err := ioutil.ReadAll(h.Response.Body) if err != nil { - return errors.Wrap(err, "unable to process API response") + return fmt.Errorf("unable to process API response: %w", err) } if h.IsSuccess() || h.IsRedirection() { if unmarshalInto != nil { |