Skip to content

Commit c45d344

Browse files
wakucanary add some more detail if exception
1 parent bcca31a commit c45d344

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
@@ -281,9 +281,9 @@ proc main(rng: ref HmacDrbgContext): Future[int] {.async.} =
281281
if conf.ping:
282282
try:
283283
pingSuccess = await pingFut
284-
except CatchableError:
284+
except CatchableError as exc:
285285
pingSuccess = false
286-
error "Ping operation failed or timed out"
286+
error "Ping operation failed or timed out", error = exc.msg
287287

288288
if conStatus in [Connected, CanConnect]:
289289
let nodeProtocols = lp2pPeerStore[ProtoBook][peer.peerId]
@@ -292,12 +292,11 @@ proc main(rng: ref HmacDrbgContext): Future[int] {.async.} =
292292
error "Not all protocols are supported",
293293
expected = conf.protocols, supported = nodeProtocols
294294
quit(QuitFailure)
295-
295+
296296
# Check ping result if ping was enabled
297297
if conf.ping and not pingSuccess:
298298
error "Node is reachable and supports protocols but ping failed - connection may be unstable"
299299
quit(QuitFailure)
300-
301300
elif conStatus == CannotConnect:
302301
error "Could not connect", peerId = peer.peerId
303302
quit(QuitFailure)

0 commit comments

Comments
 (0)