mirror of https://github.com/status-im/go-waku.git
fix: empty responses should not generate an error
This commit is contained in:
parent
e0ccdbe966
commit
29a6c1579d
|
@ -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))
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue