fix: use debug level for content topic extraction error

This commit is contained in:
Richard Ramos 2023-02-24 09:32:13 -04:00 committed by RichΛrd
parent 2f49117061
commit 4fd4bea837
2 changed files with 6 additions and 1 deletions

View File

@ -154,7 +154,8 @@ type MemoryMessageStore struct {
func NewReceivedMessage(env *protocol.Envelope, msgType MessageType) *ReceivedMessage {
ct, err := ExtractTopicFromContentTopic(env.Message().ContentTopic)
if err != nil {
log.Error("failed to extract content topic from message", "topic", env.Message().ContentTopic, "err", err)
log.Debug("failed to extract content topic from message", "topic", env.Message().ContentTopic, "err", err)
return nil
}
return &ReceivedMessage{

View File

@ -1235,6 +1235,10 @@ func (w *Waku) OnNewEnvelopes(envelope *protocol.Envelope, msgType common.Messag
}
recvMessage := common.NewReceivedMessage(envelope, msgType)
if recvMessage == nil {
return nil, nil
}
envelopeErrors := make([]common.EnvelopeError, 0)
logger := w.logger.With(zap.String("hash", recvMessage.Hash().Hex()))