Merge pull request #1234 from lnbits/fix/cashu/logging1

fix logger
This commit is contained in:
calle 2022-12-22 20:10:28 +01:00 committed by GitHub
commit d0ed93aec8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -306,13 +306,13 @@ async def melt_coins(
else: else:
logger.debug(f"Cashu: Payment failed for {invoice_obj.payment_hash}") logger.debug(f"Cashu: Payment failed for {invoice_obj.payment_hash}")
except Exception as e: except Exception as e:
logger.debug(f"Cashu: Exception for {invoice_obj.payment_hash}: {e}") logger.debug(f"Cashu: Exception for {invoice_obj.payment_hash}: {str(e)}")
raise HTTPException( raise HTTPException(
status_code=HTTPStatus.BAD_REQUEST, status_code=HTTPStatus.BAD_REQUEST,
detail=f"Cashu: {str(e)}", detail=f"Cashu: {str(e)}",
) )
finally: finally:
logger.debug(f"Cashu: Unset pending for {invoice_obj.payment_hash}: {e}") logger.debug(f"Cashu: Unset pending for {invoice_obj.payment_hash}")
# delete proofs from pending list # delete proofs from pending list
await ledger._unset_proofs_pending(proofs) await ledger._unset_proofs_pending(proofs)