We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76e65f4 commit 567db39Copy full SHA for 567db39
src/chat/client.nim
@@ -234,9 +234,11 @@ proc newPrivateConversation*(client: Client,
234
proc parseMessage(client: Client, msg: ChatPayload) {.raises: [ValueError,
235
SerializationError].} =
236
## Receives a incoming payload, decodes it, and processes it.
237
-
238
- let envelope = decode(msg.bytes, WapEnvelopeV1).valueOr:
239
- raise newException(ValueError, "Failed to decode WapEnvelopeV1: " & error)
+ let envelopeRes = decode(msg.bytes, WapEnvelopeV1)
+ if envelopeRes.isErr:
+ debug "Failed to decode WapEnvelopeV1", err = envelopeRes.error
240
+ return
241
+ let envelope = envelopeRes.get()
242
243
let convo = block:
244
let opt = client.getConversationFromHint(envelope.conversationHint).valueOr:
0 commit comments