Fix error type, should be misconfigured not invalid terminator

This commit is contained in:
Paul Lorenz
2022-08-11 13:54:13 -04:00
parent 4a30a07d1c
commit 083abccffe
+2 -2
View File
@@ -17,7 +17,7 @@
package xgress_edge_transport
import (
"fmt"
"github.com/pkg/errors"
"time"
"github.com/michaelquigley/pfxlog"
@@ -55,7 +55,7 @@ func (txd *dialer) Dial(destination string, circuitId *identity.TokenId, address
txDestination, err := transport.ParseAddress(destination)
if err != nil {
return nil, xgress.InvalidTerminatorError{InnerError: fmt.Errorf("cannot dial on invalid address [%s] (%s)", destination, err)}
return nil, xgress.MisconfiguredTerminatorError{InnerError: errors.Wrapf(err, "cannot dial on invalid address [%s]", destination)}
}
log.Debug("dialing")