Commit fc3cd3b
committed
fix: await dispatchTool so async rejections are caught by try/catch
Without await, the surrounding catch only handles synchronous throws.
Any async rejection from a tool handler (e.g. detectMetadata() I/O
failure) would escape as an unhandled MCP error instead of returning
the structured JSON error response.1 parent 6d5026b commit fc3cd3b
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
496 | | - | |
| 496 | + | |
497 | 497 | | |
498 | 498 | | |
499 | 499 | | |
| |||
0 commit comments