diff --git a/flow/cmd/mirror_status.go b/flow/cmd/mirror_status.go index abf6c95f8..70efa7597 100644 --- a/flow/cmd/mirror_status.go +++ b/flow/cmd/mirror_status.go @@ -507,6 +507,10 @@ func (h *FlowRequestHandler) GetCDCBatches(ctx context.Context, req *protos.GetC return nil, err } + if batches == nil { + batches = []*protos.CDCBatch{} + } + return &protos.GetCDCBatchesResponse{ CdcBatches: batches, }, nil @@ -545,6 +549,10 @@ func (h *FlowRequestHandler) CDCTableTotalCounts( if err != nil { return nil, err } + + if tableCounts == nil { + tableCounts = []*protos.CDCTableRowCounts{} + } return &protos.CDCTableTotalCountsResponse{TotalData: &totalCount, TablesData: tableCounts}, nil }