mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
disconnected returns, an unexpected error to List() returning 500s (#18959)
provide the error string appropriately so that the matching of error types works. Also add a string based fallback for the said error.
This commit is contained in:
parent
63bf5f42a1
commit
960d604013
@ -148,6 +148,8 @@ func toStorageErr(err error) error {
|
||||
return errDiskOngoingReq
|
||||
case grid.ErrUnknownHandler.Error():
|
||||
return errInconsistentDisk
|
||||
case grid.ErrDisconnected.Error():
|
||||
return errDiskNotFound
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
@ -1374,7 +1374,7 @@ func (c *Connection) handleDisconnectClientMux(m message) {
|
||||
if m.Flags&FlagPayloadIsErr != 0 {
|
||||
v.error(RemoteErr(m.Payload))
|
||||
} else {
|
||||
v.error("remote disconnected")
|
||||
v.error(ErrDisconnected)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ import (
|
||||
)
|
||||
|
||||
// ErrDisconnected is returned when the connection to the remote has been lost during the call.
|
||||
var ErrDisconnected = errors.New("remote disconnected")
|
||||
var ErrDisconnected = RemoteErr("remote disconnected")
|
||||
|
||||
const (
|
||||
// minBufferSize is the minimum buffer size.
|
||||
|
Loading…
Reference in New Issue
Block a user