From c6c7cf70ec4dd70dbce4e4516d72d581be29521f Mon Sep 17 00:00:00 2001 From: Sven Luethi Date: Tue, 11 Aug 2026 10:55:15 +0200 Subject: [PATCH] Fix swallowed query-parse errors in request handler The logging call passed the exception as a positional argument with no %s placeholder in the format string: LOGGER.error("Error parsing query: ", e) Python's logging applies msg % args, which raised TypeError (not all arguments converted during string formatting) inside logging.handleError. The logging framework swallows that secondary error, so neither the intended message nor the exception was ever recorded. Use an f-string so the exception is actually rendered and logged. --- netbox_dns_bridge/request_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox_dns_bridge/request_handler.py b/netbox_dns_bridge/request_handler.py index a8f32d5..126ad49 100644 --- a/netbox_dns_bridge/request_handler.py +++ b/netbox_dns_bridge/request_handler.py @@ -319,7 +319,7 @@ class DNSBaseRequestHandler(socketserver.BaseRequestHandler): return except Exception as e: - LOGGER.error("Error parsing query: ", e) + LOGGER.error(f"Error parsing query: {e}") return # If there was no question in the query, refuse