print errors for tracking/debugging

This commit is contained in:
Tiago vasconcelos 2021-06-25 10:15:50 +01:00
parent 4585d97324
commit 756b121105

View file

@ -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()
if "payment-received" in message["type"]:
print('Received message: %s' % message)
if "payment-received" in message["type"]:
yield message["paymentHash"]
except OSError as ose: