Skip to content

Commit fb0da5a

Browse files
committed
rename
1 parent 0641baa commit fb0da5a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

fastapi_mcp/transport/http.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ async def start_server():
7474
response_headers = []
7575
response_body = b""
7676

77-
async def capture_send(message):
77+
async def send_callback(message):
7878
nonlocal response_started, response_status, response_headers, response_body
7979

8080
if message["type"] == "http.response.start":
@@ -86,7 +86,7 @@ async def capture_send(message):
8686

8787
try:
8888
# Delegate to the SDK's handle_request method with ASGI interface
89-
await self.handle_request(request.scope, request.receive, capture_send)
89+
await self.handle_request(request.scope, request.receive, send_callback)
9090

9191
# Convert the captured ASGI response to a FastAPI Response
9292
headers_dict = {name.decode(): value.decode() for name, value in response_headers}
@@ -97,6 +97,6 @@ async def capture_send(message):
9797
headers=headers_dict,
9898
)
9999

100-
except Exception as e:
101-
logger.exception(f"Error in StreamableHTTPServerTransport: {e}")
100+
except Exception:
101+
logger.exception("Error in StreamableHTTPServerTransport")
102102
raise HTTPException(status_code=500, detail="Internal server error")

0 commit comments

Comments
 (0)