From a6eb39d2786bf4576ee8c670f89d05b1ec846209 Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Wed, 5 Oct 2022 21:31:15 +0200 Subject: [PATCH] lnbits error check --- cashu/lightning/lnbits.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cashu/lightning/lnbits.py b/cashu/lightning/lnbits.py index 0df13b2..ed655bf 100644 --- a/cashu/lightning/lnbits.py +++ b/cashu/lightning/lnbits.py @@ -87,7 +87,7 @@ class LNbitsWallet(Wallet): except: error_message = r.json()["detail"] return PaymentResponse(None, None, None, None, error_message) - if r.status_code != 200: + if r.status_code > 299: return PaymentResponse(None, None, None, None, f"HTTP status: {r.reason}") if "detail" in r.json(): return PaymentResponse(None, None, None, None, r.json()["detail"])