You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: fix unreachable code example and section placement in migration guide
Split the two-throw example into separate registerTool calls so both
code paths are reachable, as suggested by @felixweinberger. Moved the
section under Breaking Changes (H3) where it belongs structurally.
> **Note:** These task APIs are marked `@experimental` and may change without notice.
823
823
824
+
### Tool error sanitization
825
+
826
+
Tool handlers that `throw new Error('message')` will now return `"Internal error"` to clients instead of the raw error message. This prevents accidental leakage of server internals (hostnames, connection strings, stack traces).
827
+
828
+
To send a user-visible error message, use the new `ToolError` class:
Tool handlers that `throw new Error('message')` will now return `"Internal error"` to clients instead of the raw error message. This prevents accidental leakage of server internals (hostnames, connection strings, stack traces).
876
-
877
-
To send a user-visible error message, use the new `ToolError` class:
0 commit comments