From a8c3181852a162795416ad6c53d4c9891e562826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Tue, 11 Nov 2025 11:46:59 +0100 Subject: [PATCH] fix: check_callback_url in dispatch_webhook was not handled (#3503) --- lnbits/core/services/notifications.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lnbits/core/services/notifications.py b/lnbits/core/services/notifications.py index 41c25ed3..95ce916e 100644 --- a/lnbits/core/services/notifications.py +++ b/lnbits/core/services/notifications.py @@ -241,6 +241,10 @@ async def dispatch_webhook(payment: Payment): async with httpx.AsyncClient(headers=headers) as client: try: check_callback_url(payment.webhook) + except ValueError as exc: + await mark_webhook_sent(payment.payment_hash, "-1") + logger.warning(f"Invalid webhook URL {payment.webhook}: {exc!s}") + try: r = await client.post(payment.webhook, json=payment.json(), timeout=40) r.raise_for_status() await mark_webhook_sent(payment.payment_hash, str(r.status_code))