Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions telemetry/definitions/commonDefinitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7138,6 +7138,26 @@
"type": "result"
}
]
},
{
"name": "webview_error",
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

@jpinkney-aws jpinkney-aws Sep 4, 2024

Choose a reason for hiding this comment

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

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

Copy link
Contributor

Choose a reason for hiding this comment

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

"description": "Called when an error occurs inside of a webview",
"metadata": [
{
"type": "name",
"required": true
}
]
},
{
"name": "webview_load",
"description": "Called when a webview is opened",
"metadata": [
{
"type": "name",
"required": true
}
]
}
]
}