Skip to content

Commit ac866c1

Browse files
wakucanary add some more detail if exception
1 parent c3c03b8 commit ac866c1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

apps/wakucanary/wakucanary.nim

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,9 @@ proc main(rng: ref HmacDrbgContext): Future[int] {.async.} =
274274
if conf.ping:
275275
try:
276276
pingSuccess = await pingFut
277-
except CatchableError:
277+
except CatchableError as exc:
278278
pingSuccess = false
279-
error "Ping operation failed or timed out"
279+
error "Ping operation failed or timed out", error = exc.msg
280280

281281
if conStatus in [Connected, CanConnect]:
282282
let nodeProtocols = lp2pPeerStore[ProtoBook][peer.peerId]
@@ -285,12 +285,11 @@ proc main(rng: ref HmacDrbgContext): Future[int] {.async.} =
285285
error "Not all protocols are supported",
286286
expected = conf.protocols, supported = nodeProtocols
287287
quit(QuitFailure)
288-
288+
289289
# Check ping result if ping was enabled
290290
if conf.ping and not pingSuccess:
291291
error "Node is reachable and supports protocols but ping failed - connection may be unstable"
292292
quit(QuitFailure)
293-
294293
elif conStatus == CannotConnect:
295294
error "Could not connect", peerId = peer.peerId
296295
quit(QuitFailure)

0 commit comments

Comments
 (0)