From f9c5e4be5124e9dd527e2815c6fe7cf8b0e3d055 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 1 May 2025 14:24:35 +0200 Subject: [PATCH] Continued: - include exception in message, too --- fba/http/csrf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fba/http/csrf.py b/fba/http/csrf.py index f2871c9..8a487df 100644 --- a/fba/http/csrf.py +++ b/fba/http/csrf.py @@ -72,8 +72,8 @@ def determine(domain: str, headers: dict) -> dict: logger.debug("meta[]='%s'", type(meta)) tag = meta.find("meta", attrs={"name": "csrf-token"}) - except bs4.builder.ParserRejectedMarkup: - logger.warning("domain='%s' has returned invalid HTML markup", domain) + except bs4.builder.ParserRejectedMarkup as exception: + logger.warning("domain='%s' has returned invalid HTML markup: exception='%s'", domain, exception) logger.debug("tag[]='%s'", type(tag)) if tag is None: -- 2.39.5