diff --git a/src/clients/storage/StorageClientBase-inl.h b/src/clients/storage/StorageClientBase-inl.h index b041c21bc57..6e069acc069 100644 --- a/src/clients/storage/StorageClientBase-inl.h +++ b/src/clients/storage/StorageClientBase-inl.h @@ -198,14 +198,20 @@ folly::Future> StorageClientBase(); - if (ex && ex->getType() == TransportException::TIMED_OUT) { - LOG(ERROR) << "Request to " << host << " time out: " << ex->what(); + if (ex) { + if (ex->getType() == TransportException::TIMED_OUT) { + LOG(ERROR) << "Request to " << host << " time out: " << ex->what(); + return Status::Error("RPC failure in StorageClient with timeout: %s", ex->what()); + } else { + LOG(ERROR) << "Request to " << host << " failed: " << ex->what(); + return Status::Error("RPC failure in StorageClient: %s", ex->what()); + } } else { auto partsId = getReqPartsId(request); invalidLeader(spaceId, partsId); - LOG(ERROR) << "Request to " << host << " failed: " << ex->what(); + LOG(ERROR) << "Request to " << host << " failed."; + return Status::Error("RPC failure in StorageClient."); } - return Status::Error("RPC failure in StorageClient, probably timeout: %s", ex->what()); }); }