Add definitions for a module erroring#839
Conversation
7b274d1 to
dc421bc
Compare
dc421bc to
f139ff6
Compare
|
I suggest building on toolkit_openModule from #835 and making these
These become more generalized than "web views" (suggestion is non-blocking) |
| ] | ||
| }, | ||
| { | ||
| "name": "webview_error", |
There was a problem hiding this comment.
Why is this needed? Every event can store result, reason, reasonDesc. Errors should not be modeled as separate events, they should be modeled as existing events with result=Failed + reason.
E.g. in this case webview_load could be such an event. If failure can occur after load, and we want a generic "webview interaction" event, then let's consider that instead. E.g. webview_click, webview_submit, etc.
There was a problem hiding this comment.
webview_error in this case is an generic error that can get thrown inside of mynah ui. Not sure if you can tie it directly to a chatMessage or anything since it can appear whenever: https://github.com/aws/aws-toolkit-vscode/blob/master/packages/core/src/amazonq/webview/ui/main.ts#L26
In the case of webview_load, thats how we do it. If the webview fails to load we set the reason description and result failed
+1 Though Instead of dedicated "error" events, model actual events which can fail (result=Failed). |
|
Does In VSCode it's goal is to track: |
That could make sense. Mentioning "Example: window.addEventListener('error')" in the description could help too. OTOH, if we want a generic thing that captures unknown webview events, can we not name it |
Problem
We have no way to track errors that occur within a module that occur outside of a regular telemetry execution scope. E.g. listening on a window for errors via
window.addEventListener('error')Solution
toolkit_errorModulewhich is called when an unexpected error occurs outside of regular telemetry messagesLicense
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.