Skip to content

refactor: centralize tool handler error handling - #171

Open
f3tchcodes wants to merge 7 commits into
mozilla:mainfrom
f3tchcodes:refactor/tool-handler-error-handling
Open

refactor: centralize tool handler error handling#171
f3tchcodes wants to merge 7 commits into
mozilla:mainfrom
f3tchcodes:refactor/tool-handler-error-handling

Conversation

@f3tchcodes

Copy link
Copy Markdown
Contributor

This change moves the repeated tool handler try/catch logic into a shared defineToolHandler wrapper. Errors are still returned using the same MCP error response format.

Catches with special behavior, such as UID errors, Firefox permission errors, and context cleanup, remain inside their handlers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant