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
{{ message }}
Repository navigation
Define specific errors for tool execution failures #323
There are several places in the tool execution algorithms where we either collapse distinct failures into UnknownError, or have an inline issue noting that a more specific error should eventually be plumbed back to the caller via promise rejection.
executeTool() currently uses UnknownError for several distinct failures involving the target document, origin, tool registration, and tool exposure. Maybe some of these are fine but we should be more explicit where we can.
We should audit these failure cases, decide on the right exception for each, and update the spec accordingly so that the right exception reaches the caller.
Note that this issue is about platform-level execution failures. Tool-produced, or application-level failures (i.e., the execute() callback runs but the tool wants to report that it could not or would not perform the requested operation) are a separate question tracked in #282.
Activity
domfarolino commentedon Sep 26, 2026
Also see https://crbug.com/509555636.
Replace UnknownError with specific DOMException types. (#339)
domfarolino commentedon Oct 8, 2026
This was closed by #339. Thanks!