mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-23 21:40:20 +00:00
rbd: return GRPC error from GRPC method
GRPC methods should only return GRPC errors if any error occurs. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
302fead713
commit
f12fa3ee56
@ -761,13 +761,13 @@ func (rs *ReplicationServer) GetVolumeReplicationInfo(ctx context.Context,
|
||||
if err != nil {
|
||||
log.ErrorLog(ctx, err.Error())
|
||||
|
||||
return nil, fmt.Errorf("failed to get remote status: %w", err)
|
||||
return nil, status.Errorf(codes.Internal, "failed to get remote status: %v", err)
|
||||
}
|
||||
|
||||
description := remoteStatus.Description
|
||||
lastSyncTime, err := getLastSyncTime(description)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get last sync time: %w", err)
|
||||
return nil, status.Errorf(codes.Internal, "failed to get last sync time: %v", err)
|
||||
}
|
||||
|
||||
resp := &replication.GetVolumeReplicationInfoResponse{
|
||||
|
Loading…
Reference in New Issue
Block a user