diff --git a/internal/csi-addons/rbd/replication.go b/internal/csi-addons/rbd/replication.go index df5c3732b..46a1b3e9c 100644 --- a/internal/csi-addons/rbd/replication.go +++ b/internal/csi-addons/rbd/replication.go @@ -919,6 +919,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) }