mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-22 13:34:17 +02:00
take suggestion
This commit is contained in:
parent
7f46580c14
commit
2b7712df86
1 changed files with 4 additions and 1 deletions
|
|
@ -309,7 +309,10 @@ def create_streamable_http_app(
|
|||
try:
|
||||
await session_manager.handle_request(scope, receive, send)
|
||||
except RuntimeError as e:
|
||||
if "Task group is not initialized" in str(e):
|
||||
if str(e) == "Task group is not initialized. Make sure to use run().":
|
||||
logger.error(
|
||||
f"Original RuntimeError from mcp library: {e}", exc_info=True
|
||||
)
|
||||
new_error_message = (
|
||||
"FastMCP's StreamableHTTPSessionManager task group was not initialized. "
|
||||
"This commonly occurs when the FastMCP application's lifespan is not "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue