Skip to content

Commit 9f6c5dc

Browse files
Cycloctaneprovinzkraut
authored andcommitted
Merge commit from fork
1 parent ad8ad72 commit 9f6c5dc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

litestar/logging/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def _default_exception_logging_handler(logger: Logger, scope: Scope, tb: list[st
144144

145145
def _default_exception_logging_handler(logger: Logger, scope: Scope, tb: list[str]) -> None:
146146
logger.exception(
147-
"Uncaught exception (connection_type=%s, path=%s):",
147+
"Uncaught exception (connection_type=%s, path=%r):",
148148
scope["type"],
149149
scope["path"],
150150
)

tests/unit/test_middleware/test_exception_handler_middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def handler() -> None:
245245
if should_log:
246246
assert len(caplog.records) == 1
247247
assert caplog.records[0].levelname == "ERROR"
248-
assert caplog.records[0].message.startswith("Uncaught exception (connection_type=http, path=/test):")
248+
assert caplog.records[0].message.startswith("Uncaught exception (connection_type=http, path='/test'):")
249249
else:
250250
assert not caplog.records
251251
assert "Uncaught exception" not in response.text

0 commit comments

Comments
 (0)