@@ -46,14 +46,14 @@ func GetConnection(connCfg *ConnectionConfig) (*ouroboros.Connection, error) {
46
46
ouroboros .WithLocalTxSubmissionConfig (buildLocalTxSubmissionConfig ()),
47
47
)
48
48
if err != nil {
49
- return nil , fmt .Errorf ("failure creating Ouroboros connection: %s " , err )
49
+ return nil , fmt .Errorf ("failure creating Ouroboros connection: %w " , err )
50
50
}
51
51
52
52
if cfg .Node .Address != "" && cfg .Node .Port > 0 {
53
53
// Connect to TCP port
54
54
if err := oConn .Dial ("tcp" , fmt .Sprintf ("%s:%d" , cfg .Node .Address , cfg .Node .Port )); err != nil {
55
55
return nil , fmt .Errorf (
56
- "failure connecting to node via TCP: %s " ,
56
+ "failure connecting to node via TCP: %w " ,
57
57
err ,
58
58
)
59
59
}
@@ -63,11 +63,11 @@ func GetConnection(connCfg *ConnectionConfig) (*ouroboros.Connection, error) {
63
63
if os .IsNotExist (err ) {
64
64
return nil , fmt .Errorf ("node socket path does not exist: %s" , cfg .Node .SocketPath )
65
65
} else {
66
- return nil , fmt .Errorf ("unknown error checking if node socket path exists: %s " , err )
66
+ return nil , fmt .Errorf ("unknown error checking if node socket path exists: %w " , err )
67
67
}
68
68
}
69
69
if err := oConn .Dial ("unix" , cfg .Node .SocketPath ); err != nil {
70
- return nil , fmt .Errorf ("failure connecting to node via UNIX socket: %s " , err )
70
+ return nil , fmt .Errorf ("failure connecting to node via UNIX socket: %w " , err )
71
71
}
72
72
} else {
73
73
return nil , errors .New ("you must specify either the UNIX socket path or the address/port for your cardano-node" )
0 commit comments