Fixed error reporting for lntxbot source

This commit is contained in:
benarc
2021-11-12 10:16:15 +00:00
parent 267dea4f75
commit 78f7a3914f
2 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -80,10 +80,10 @@ class LntxbotWallet(Wallet):
f"{self.endpoint}/payinvoice",
headers=self.auth,
json={"invoice": bolt11},
timeout=40,
timeout=100,
)
if r.is_error:
if "error" in r.json():
try:
data = r.json()
error_message = data["message"]