Update error handling.
This commit is contained in:
@@ -17,8 +17,8 @@ var (
|
||||
ErrConnectionUnavailable = errors.New("connection unavailable")
|
||||
)
|
||||
|
||||
func NewConfigError(text string) error {
|
||||
return fmt.Errorf("configuration error: %s", text)
|
||||
func NewConfigError(err error) error {
|
||||
return fmt.Errorf("configuration error: %w", err)
|
||||
}
|
||||
|
||||
func NewPoolError(err error) error {
|
||||
|
||||
@@ -125,7 +125,7 @@ func TestRunReader(t *testing.T) {
|
||||
incomingData <- honeybeetest.MockIncomingData{Err: io.EOF}
|
||||
|
||||
err := <-conn.Errors()
|
||||
assert.Equal(t, io.EOF, err)
|
||||
assert.ErrorIs(t, err, io.EOF)
|
||||
|
||||
honeybeetest.Eventually(t, func() bool {
|
||||
return conn.State() == transport.StateClosed
|
||||
|
||||
Reference in New Issue
Block a user