Fix error type, should be misconfigured not invalid error

This commit is contained in:
Paul Lorenz
2022-08-11 13:53:48 -04:00
parent 2b40c2780c
commit d5ba4fa41e
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ func (txd *dialer) Dial(destination string, circuitId *identity.TokenId, address
txDestination, err := transport.ParseAddress(destination)
if err != nil {
return nil, errors.Wrapf(err, "cannot dial on invalid address [%s]", destination)
return nil, xgress.MisconfiguredTerminatorError{InnerError: errors.Wrapf(err, "cannot dial on invalid address [%s]", destination)}
}
log.Debug("dialing")
+2 -2
View File
@@ -17,7 +17,7 @@
package xgress_transport_udp
import (
"fmt"
"github.com/pkg/errors"
"net"
"time"
@@ -37,7 +37,7 @@ func (txd *dialer) Dial(destination string, circuitId *identity.TokenId, address
log.Debugf("parsing %v for xgress address: %v", destination, address)
packetAddress, err := xgress_udp.Parse(destination)
if err != nil {
return nil, fmt.Errorf("cannot dial on invalid address [%s] (%w)", destination, err)
return nil, xgress.MisconfiguredTerminatorError{InnerError: errors.Wrapf(err, "cannot dial on invalid address [%s]", destination)}
}
log.Debugf("dialing packet address [%v]", packetAddress)