Skip to content

Commit

Permalink
return a string
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Apr 21, 2024
1 parent 5d8df8a commit d84eeb1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cashu/lightning/corelightningrest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit d84eeb1

Please sign in to comment.