Skip to content

Commit f93a06c

Browse files
halter73Copilot
andauthored
Update docs/concepts/filters.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 7202e4a commit f93a06c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/concepts/filters.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,12 @@ Execution flow: `filter1 -> filter2 -> filter3 -> baseHandler -> filter3 -> filt
338338
}
339339
catch (Exception ex)
340340
{
341+
var logger = context.Services?.GetService<ILogger<Program>>();
342+
logger?.LogError(ex, "Error while processing CallTool request for {ProgressToken}", context.Meta.ProgressToken);
343+
341344
return new CallToolResult
342345
{
343-
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." } },
344347
IsError = true
345348
};
346349
}

0 commit comments

Comments
 (0)