-
Notifications
You must be signed in to change notification settings - Fork 85
Package: OnError trigger sample #414
Description
Provide a packaged OnError trigger that implements the most common functionality users have in their catch-all exception handling: logging to telemetry, sending a trace activity, and sending a friendly catch-all message to end users. If used on the root dialog, this will catch all exceptions instead of the default OnTurnError handler. These can be added on child dialogs, providing greater flexibility to error handling based on where it is raised.
Sample Microsoft.OnError dialog to replace the default OnTurnError method
Log telemetry with the TelemetryTrackEvent action


Users can use the TelemetryTrackEvent action and provide the exception message that is available as an adaptive expression.
Send a trace activity
Sending a Microsoft.TraceActivity action provides greater context to the end user than the exception message in the default OnTurnError handler.
Send a response
Sending an LG formatted response provides greater flexibility than using a catch-all exception message to end users in the default OnTurnError handler.
