From d84eeb15db7e3eb9e175a9e9ebafec416b534af1 Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Sun, 21 Apr 2024 15:54:24 +0200 Subject: [PATCH] return a string --- cashu/lightning/corelightningrest.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cashu/lightning/corelightningrest.py b/cashu/lightning/corelightningrest.py index f2c634f1..d62234b6 100644 --- a/cashu/lightning/corelightningrest.py +++ b/cashu/lightning/corelightningrest.py @@ -187,9 +187,8 @@ async def pay_invoice( if r.is_error or "error" in r.json(): try: - logger.error(f"Error paying invoice: {r.text}") data = r.json() - error_message = data["error"] + error_message = str(data["error"]) except Exception: error_message = r.text return PaymentResponse(