We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7202e4a commit f93a06cCopy full SHA for f93a06c
docs/concepts/filters.md
@@ -338,9 +338,12 @@ Execution flow: `filter1 -> filter2 -> filter3 -> baseHandler -> filter3 -> filt
338
}
339
catch (Exception ex)
340
{
341
+ var logger = context.Services?.GetService<ILogger<Program>>();
342
+ logger?.LogError(ex, "Error while processing CallTool request for {ProgressToken}", context.Meta.ProgressToken);
343
+
344
return new CallToolResult
345
- Content = new[] { new TextContent { Type = "text", Text = $"Error: {ex.Message}" } },
346
+ Content = new[] { new TextContent { Type = "text", Text = "An unexpected error occurred while processing the tool call." } },
347
IsError = true
348
};
349
0 commit comments