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:
Harshavardhana
2024-02-03 01:04:33 -08:00
committed by GitHub
parent 63bf5f42a1
commit 960d604013
3 changed files with 4 additions and 2 deletions

View File

@@ -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
}