File tree Expand file tree Collapse file tree 1 file changed +28
-2
lines changed
packages/app/src/app/overmind/effects/live Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Original file line number Diff line number Diff line change 1- import { logBreadcrumb } from '@codesandbox/common/lib/utils/analytics/sentry' ;
1+ import {
2+ logBreadcrumb ,
3+ captureException ,
4+ } from '@codesandbox/common/lib/utils/analytics/sentry' ;
25import { Blocker , blocker } from 'app/utils/blocker' ;
36import { TextOperation } from 'ot' ;
47
@@ -66,7 +69,20 @@ export class CodeSandboxOTClient extends OTClient {
6669 } ) } `,
6770 } ) ;
6871
69- this . safeServerAck ( revision ) ;
72+ try {
73+ this . safeServerAck ( revision ) ;
74+ } catch ( err ) {
75+ captureException (
76+ new Error (
77+ `Server Ack ERROR ${ JSON . stringify ( {
78+ moduleShortid : this . moduleShortid ,
79+ currentRevision : this . revision ,
80+ currentState : this . state . name ,
81+ operation,
82+ } ) } `
83+ )
84+ ) ;
85+ }
7086 } )
7187 . catch ( error => {
7288 // If an operation errors on the server we will reject
@@ -118,6 +134,16 @@ export class CodeSandboxOTClient extends OTClient {
118134 }
119135
120136 applyServer ( operation : TextOperation ) {
137+ logBreadcrumb ( {
138+ category : 'ot' ,
139+ message : `Apply Server ${ JSON . stringify ( {
140+ moduleShortid : this . moduleShortid ,
141+ currentRevision : this . revision ,
142+ currentState : this . state . name ,
143+ operation,
144+ } ) } `,
145+ } ) ;
146+
121147 super . applyServer ( operation ) ;
122148 }
123149
You can’t perform that action at this time.
0 commit comments