fix (events): convert multierror to stdlib error (#3743)
* fix (events): convert multierror to stdlib error multierror errors will be converted to a stdlib error (because multierror doesn't support json marshaling). * refact (errors): convert from multierror to stdlib errors.Join(...) * refact: convert from pkg/errors to stdlib error wrapping
This commit is contained in:
28 files changed
+142
-152
No files matched your search
@@ -6,6 +6,7 @@ package base
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"errors"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io"
|
||||
@@ -27,7 +28,6 @@ import (
|
||||
"github.com/hashicorp/go-secure-stdlib/parseutil"
|
||||
"github.com/hashicorp/go-secure-stdlib/pluginutil/v2"
|
||||
"github.com/mitchellh/cli"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
@@ -246,7 +246,7 @@ func (c *Command) Client(opt ...Option) (*api.Client, error) {
|
||||
if modifiedTLS {
|
||||
// Setup TLS config
|
||||
if err := c.client.SetTLSConfig(tlsConfig); err != nil {
|
||||
return nil, errors.Wrap(err, "failed to setup TLS config")
|
||||
return nil, fmt.Errorf("failed to setup TLS config: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user