File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
packages/app/src/app/overmind/effects/live Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,10 @@ class Live {
195195 } ) ;
196196
197197 this . socket . onClose ( e => {
198+ captureException (
199+ new Error ( 'Connection loss with live, reason: ' + e . code )
200+ ) ;
201+
198202 if ( e . code === 1006 ) {
199203 // This is an abrupt close, the server probably restarted or carshed. We don't want to overload
200204 // the server, so we manually wait and try to connect;
@@ -304,6 +308,12 @@ class Live {
304308 event === 'phx_error' ;
305309 const alteredEvent = disconnected ? 'connection-loss' : event ;
306310
311+ if ( event === 'phx_error' ) {
312+ captureException (
313+ new Error ( 'Received phoenix error: ' + JSON . stringify ( data ) )
314+ ) ;
315+ }
316+
307317 const _isOwnMessage = Boolean (
308318 data && data . _messageId && this . pendingMessages . delete ( data . _messageId )
309319 ) ;
You can’t perform that action at this time.
0 commit comments