same behaviour on error
This commit is contained in:
@@ -284,9 +284,11 @@ class MCPClient(BaseObject):
|
|||||||
logger.error("Error applying output filter")
|
logger.error("Error applying output filter")
|
||||||
response = ""
|
response = ""
|
||||||
|
|
||||||
if response and isinstance(response, str):
|
if response and len(response) and isinstance(response, str):
|
||||||
logger.info(f"Tool '{function_name}' completed successfully")
|
logger.info(f"Tool '{function_name}' completed successfully")
|
||||||
logger.debug(f"Final response: {response}")
|
logger.debug(f"Final response: {response}")
|
||||||
|
else:
|
||||||
|
response = "Sorry, could not call the mcp tool"
|
||||||
|
|
||||||
await result_callback(response)
|
await result_callback(response)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user