File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ async def start_server():
74
74
response_headers = []
75
75
response_body = b""
76
76
77
- async def capture_send (message ):
77
+ async def send_callback (message ):
78
78
nonlocal response_started , response_status , response_headers , response_body
79
79
80
80
if message ["type" ] == "http.response.start" :
@@ -86,7 +86,7 @@ async def capture_send(message):
86
86
87
87
try :
88
88
# 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 )
90
90
91
91
# Convert the captured ASGI response to a FastAPI Response
92
92
headers_dict = {name .decode (): value .decode () for name , value in response_headers }
@@ -97,6 +97,6 @@ async def capture_send(message):
97
97
headers = headers_dict ,
98
98
)
99
99
100
- except Exception as e :
101
- logger .exception (f "Error in StreamableHTTPServerTransport: { e } " )
100
+ except Exception :
101
+ logger .exception ("Error in StreamableHTTPServerTransport" )
102
102
raise HTTPException (status_code = 500 , detail = "Internal server error" )
You can’t perform that action at this time.
0 commit comments