print errors for tracking/debugging
This commit is contained in:
parent
4585d97324
commit
756b121105
1 changed files with 3 additions and 2 deletions
|
|
@ -61,7 +61,7 @@ class EclairWallet(Wallet):
|
||||||
try:
|
try:
|
||||||
data = r.json()
|
data = r.json()
|
||||||
if "error" in data:
|
if "error" in data:
|
||||||
print('ERROR', data["error"])
|
print(f"ERROR-{key}", data["error"])
|
||||||
raise EclairError(data["error"])
|
raise EclairError(data["error"])
|
||||||
except:
|
except:
|
||||||
raise UnknownError(r.text)
|
raise UnknownError(r.text)
|
||||||
|
|
@ -156,8 +156,9 @@ class EclairWallet(Wallet):
|
||||||
try:
|
try:
|
||||||
async with open_websocket_url(ws_url, extra_headers=[('Authorization', self.auth["Authorization"])]) as ws:
|
async with open_websocket_url(ws_url, extra_headers=[('Authorization', self.auth["Authorization"])]) as ws:
|
||||||
message = await ws.get_message()
|
message = await ws.get_message()
|
||||||
|
print('Received message: %s' % message)
|
||||||
|
|
||||||
if "payment-received" in message["type"]:
|
if "payment-received" in message["type"]:
|
||||||
print('Received message: %s' % message)
|
|
||||||
yield message["paymentHash"]
|
yield message["paymentHash"]
|
||||||
|
|
||||||
except OSError as ose:
|
except OSError as ose:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue