mirror of
https://github.com/lnbits/lnbits.git
synced 2025-03-29 11:12:11 +01:00
log errors on faulty lnpay webhooks.
This commit is contained in:
parent
a198842f50
commit
a67b93108b
@ -110,7 +110,11 @@ class LNPayWallet(Wallet):
|
||||
|
||||
async def webhook_listener(self):
|
||||
text: str = await request.get_data()
|
||||
data = json.loads(text)
|
||||
try:
|
||||
data = json.loads(text)
|
||||
except json.decoder.JSONDecodeError:
|
||||
print(f"got something wrong on lnpay webhook endpoint: {text[:200]}")
|
||||
data = None
|
||||
if type(data) is not dict or "event" not in data or data["event"].get("name") != "wallet_receive":
|
||||
return "", HTTPStatus.NO_CONTENT
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user