From 756b121105848b4042f3e54bc5857afd637a46d4 Mon Sep 17 00:00:00 2001 From: Tiago vasconcelos Date: Fri, 25 Jun 2021 10:15:50 +0100 Subject: [PATCH] print errors for tracking/debugging --- lnbits/wallets/eclair.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lnbits/wallets/eclair.py b/lnbits/wallets/eclair.py index 9c8fa540..59d2ffdf 100644 --- a/lnbits/wallets/eclair.py +++ b/lnbits/wallets/eclair.py @@ -61,7 +61,7 @@ class EclairWallet(Wallet): try: data = r.json() if "error" in data: - print('ERROR', data["error"]) + print(f"ERROR-{key}", data["error"]) raise EclairError(data["error"]) except: raise UnknownError(r.text) @@ -156,8 +156,9 @@ class EclairWallet(Wallet): try: async with open_websocket_url(ws_url, extra_headers=[('Authorization', self.auth["Authorization"])]) as ws: message = await ws.get_message() + print('Received message: %s' % message) + if "payment-received" in message["type"]: - print('Received message: %s' % message) yield message["paymentHash"] except OSError as ose: