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"]