diff --git a/internal/csi-addons/rbd/replication.go b/internal/csi-addons/rbd/replication.go index 566b59cf7..366602d57 100644 --- a/internal/csi-addons/rbd/replication.go +++ b/internal/csi-addons/rbd/replication.go @@ -876,6 +876,10 @@ func (rs *ReplicationServer) GetVolumeReplicationInfo(ctx context.Context, if err != nil { log.ErrorLog(ctx, err.Error()) + if errors.Is(err, librbd.ErrNotExist) { + return nil, status.Errorf(codes.NotFound, "failed to get remote status: %v", err) + } + return nil, status.Errorf(codes.Internal, "failed to get remote status: %v", err) }