Skip to content

Commit 42919c8

Browse files
author
Alessio Treglia
authored
server: wrap errors (#8879)
Follow-up of #8842
1 parent d4d27e1 commit 42919c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/test_helpers.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ package server
33
import (
44
"fmt"
55
"net"
6+
7+
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
68
)
79

810
// Get a free address for a test tendermint server
@@ -14,7 +16,7 @@ func FreeTCPAddr() (addr, port string, err error) {
1416
}
1517

1618
if err := l.Close(); err != nil {
17-
return "", "", fmt.Errorf("couldn't close the listener: %w", err)
19+
return "", "", sdkerrors.Wrap(err, "couldn't close the listener")
1820
}
1921

2022
portI := l.Addr().(*net.TCPAddr).Port

0 commit comments

Comments
 (0)