From 0b10cbab1d6368fcab2d5a7b6fe359a6cecc81a7 Mon Sep 17 00:00:00 2001 From: "Paul J. Dorn" Date: Thu, 7 Dec 2023 08:16:33 +0100 Subject: [PATCH] unconditionally log request error Somehow exception logging was conditional on successful request uri parsing. Add it back for the other branch. --- gunicorn/workers/base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gunicorn/workers/base.py b/gunicorn/workers/base.py index f321dd2d4..f97d923c7 100644 --- a/gunicorn/workers/base.py +++ b/gunicorn/workers/base.py @@ -251,6 +251,8 @@ def handle_error(self, req, client, addr, exc): else: if hasattr(req, "uri"): self.log.exception("Error handling request %s", req.uri) + else: + self.log.exception("Error handling request (no URI read)") status_int = 500 reason = "Internal Server Error" mesg = ""