Skip to content

fix: handle errors due to open dialogs during tool calls#1953

Merged
samiyac merged 1 commit intomainfrom
mcp-dialog-pt1
Apr 28, 2026
Merged

fix: handle errors due to open dialogs during tool calls#1953
samiyac merged 1 commit intomainfrom
mcp-dialog-pt1

Conversation

@samiyac
Copy link
Copy Markdown
Contributor

@samiyac samiyac commented Apr 24, 2026

This change is part of the fix for #1069

  • Errors during tool calls are now consumed and handled as part of McpResponse format

@samiyac samiyac requested a review from OrKoN April 27, 2026 12:35
Comment thread src/index.ts Outdated
Copy link
Copy Markdown
Collaborator

@OrKoN OrKoN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add tests?

Comment thread src/tools/ToolDefinition.ts Outdated
@samiyac
Copy link
Copy Markdown
Contributor Author

samiyac commented Apr 27, 2026

Added a test

@samiyac samiyac requested a review from OrKoN April 27, 2026 19:07
Comment thread tests/index.test.ts Outdated
Comment thread tests/index.test.js.snapshot Outdated
@samiyac samiyac requested a review from OrKoN April 28, 2026 15:45
Comment thread tests/index.test.ts Outdated
Comment thread tests/index.test.ts Outdated
@samiyac samiyac added this pull request to the merge queue Apr 28, 2026
@samiyac samiyac removed this pull request from the merge queue due to a manual request Apr 28, 2026
This change also adds a check for existence of open dialogs before trying to detect open devtools

ran prettier

add try catch block in index.ts to handle dialog

add test

add test

ran prettier

ran prettier

update test to use snapshot assertion

Update handling of errors from tool execution

mark isError as true
@samiyac samiyac enabled auto-merge April 28, 2026 16:41
@samiyac samiyac added this pull request to the merge queue Apr 28, 2026
Merged via the queue into main with commit 06b331f Apr 28, 2026
20 checks passed
@samiyac samiyac deleted the mcp-dialog-pt1 branch April 28, 2026 16:54
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.

2 participants