File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -144,11 +144,19 @@ const widgetPostHangupProcedure = async (
144144 // We send the hangup event after the memberships have been updated
145145 // calling leaveRTCSession.
146146 // We need to wait because this makes the client hosting this widget killing the IFrame.
147- await widget . api . transport . send ( ElementWidgetActions . HangupCall , { } ) ;
147+ try {
148+ await widget . api . transport . send ( ElementWidgetActions . HangupCall , { } ) ;
149+ } catch ( e ) {
150+ logger . error ( "Failed to send hangup action" , e ) ;
151+ }
148152 // On a normal user hangup we can shut down and close the widget. But if an
149153 // error occurs we should keep the widget open until the user reads it.
150154 if ( cause === "user" ) {
151- await widget . api . transport . send ( ElementWidgetActions . Close , { } ) ;
155+ try {
156+ await widget . api . transport . send ( ElementWidgetActions . Close , { } ) ;
157+ } catch ( e ) {
158+ logger . error ( "Failed to send close action" , e ) ;
159+ }
152160 widget . api . transport . stop ( ) ;
153161 PosthogAnalytics . instance . logout ( ) ;
154162 }
You can’t perform that action at this time.
0 commit comments