Skip to content

πŸš€ The fast, Pythonic way to build MCP servers and clients.

PR Feedback

William Eastonac8caca269b7
diff --git a/src/fastmcp/server/middleware/logging.py b/src/fastmcp/server/middleware/logging.py
index 03f9b2936..3511a3388 100644
--- a/src/fastmcp/server/middleware/logging.py
+++ b/src/fastmcp/server/middleware/logging.py
@@ -78,7 +78,7 @@ class LoggingMiddleware(Middleware):
payload = self.payload_serializer(context.message)
except Exception as e:
self.logger.warning(
- f"Failed {str(e)} to serialize payload: {context.type} {context.method} {context.source}."
+ f"Failed {e} to serialize payload: {context.type} {context.method} {context.source}."
)
payload = default_serializer(context.message)