From 6c60e14dc3d02bb655e611a1cc89005a24eea7d8 Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Wed, 2 Oct 2024 19:25:02 +0200 Subject: [PATCH] weird error --- cashu/lightning/lnbits.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/cashu/lightning/lnbits.py b/cashu/lightning/lnbits.py index ed22bfbd..a8bb09cd 100644 --- a/cashu/lightning/lnbits.py +++ b/cashu/lightning/lnbits.py @@ -87,11 +87,8 @@ async def create_invoice( url=f"{self.endpoint}/api/v1/payments", json=data ) r.raise_for_status() - except Exception: - return InvoiceResponse( - ok=False, - error_message=r.json()["detail"], - ) + except Exception as e: + return InvoiceResponse(ok=False, error_message=str(e)) data = r.json() checking_id, payment_request = data["checking_id"], data["payment_request"]