Skip to content

Commit

Permalink
server: wrap errors (#8879)
Browse files Browse the repository at this point in the history
Follow-up of #8842
  • Loading branch information
Alessio Treglia authored Mar 15, 2021
1 parent d4d27e1 commit 42919c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package server
import (
"fmt"
"net"

sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)

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

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

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

0 comments on commit 42919c8

Please sign in to comment.