diff --git a/waku/v2/protocol/store/waku_store_client.go b/waku/v2/protocol/store/waku_store_client.go index ab450c9b..527e5f21 100644 --- a/waku/v2/protocol/store/waku_store_client.go +++ b/waku/v2/protocol/store/waku_store_client.go @@ -206,9 +206,10 @@ func (store *WakuStore) queryFrom(ctx context.Context, q *pb.HistoryQuery, selec } if historyResponseRPC.Response == nil { - logger.Error("empty response") - metrics.RecordStoreError(store.ctx, "emptyRpcResponseFailure") - return nil, ErrEmptyResponse + // Empty response + return &pb.HistoryResponse{ + PagingInfo: &pb.PagingInfo{}, + }, nil } metrics.RecordMessage(ctx, "retrieved", len(historyResponseRPC.Response.Messages)) diff --git a/waku/v2/protocol/store/waku_store_common.go b/waku/v2/protocol/store/waku_store_common.go index 3aaf6246..f4bed7cf 100644 --- a/waku/v2/protocol/store/waku_store_common.go +++ b/waku/v2/protocol/store/waku_store_common.go @@ -41,8 +41,6 @@ var ( ErrFailedQuery = errors.New("failed to resolve the query") ErrFutureMessage = errors.New("message timestamp in the future") - - ErrEmptyResponse = errors.New("empty store response") ) type WakuSwap interface {