diff --git a/waku/v2/protocol/store/pb/validation.go b/waku/v2/protocol/store/pb/validation.go index f54dea90..aea3e923 100644 --- a/waku/v2/protocol/store/pb/validation.go +++ b/waku/v2/protocol/store/pb/validation.go @@ -1,7 +1,9 @@ package pb import ( + "encoding/hex" "errors" + "fmt" ) // MaxContentTopics is the maximum number of allowed contenttopics in a query @@ -10,7 +12,6 @@ const MaxContentTopics = 10 var ( errMissingRequestID = errors.New("missing RequestId field") errMessageHashOtherFields = errors.New("cannot use MessageHashes with ContentTopics/PubsubTopic") - errRequestIDMismatch = errors.New("requestID in response does not match request") errMaxContentTopics = errors.New("exceeds the maximum number of ContentTopics allowed") errEmptyContentTopic = errors.New("one or more content topics specified is empty") errMissingPubsubTopic = errors.New("missing PubsubTopic field") @@ -58,7 +59,7 @@ func (x *StoreQueryRequest) Validate() error { func (x *StoreQueryResponse) Validate(requestID string) error { if x.RequestId != "" && x.RequestId != requestID { - return errRequestIDMismatch + return fmt.Errorf("requestID %s in response does not match requestID in request %s", hex.EncodeToString([]byte(x.RequestId)), hex.EncodeToString([]byte(requestID))) } if x.StatusCode == nil {