Skip to content

Commit

Permalink
lightpush: make error metric less variable by only setting a fixed st…
Browse files Browse the repository at this point in the history
…ring
  • Loading branch information
Ivansete-status committed Sep 5, 2024
1 parent 01fe4d1 commit e01082e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions waku/waku_lightpush/callbacks.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import
../waku_relay,
./common,
./protocol,
./protocol_metrics,
../waku_rln_relay,
../waku_rln_relay/protocol_types

Expand Down Expand Up @@ -54,8 +55,6 @@ proc getRelayPushHandler*(
## Agreed change expected to the lightpush protocol to better handle such case. https://github.com/waku-org/pm/issues/93
let msgHash = computeMessageHash(pubsubTopic, message).to0xHex()
notice "Lightpush request has not been published to any peers", msg_hash = msgHash
return err(
"Lightpush request has not been published to any peers. msg_hash: " & msgHash
)
return err(protocol_metrics.notPublishedAnyPeer)

return ok()
1 change: 1 addition & 0 deletions waku/waku_lightpush/protocol_metrics.nim
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ const
emptyResponseBodyFailure* = "empty_response_body_failure"
messagePushFailure* = "message_push_failure"
requestLimitReachedFailure* = "request_limit_reached_failure"
notPublishedAnyPeer* = "not_published_to_any_peer"

0 comments on commit e01082e

Please sign in to comment.