File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -251,6 +251,7 @@ const ProjectSaverHOC = function (WrappedComponent) {
251
251
if ( id && this . props . onUpdateProjectThumbnail ) {
252
252
this . storeProjectThumbnail ( id ) ;
253
253
}
254
+ this . reportTelemetryEvent ( 'projectDidSave' ) ;
254
255
return response ;
255
256
} )
256
257
. catch ( err => {
@@ -291,9 +292,15 @@ const ProjectSaverHOC = function (WrappedComponent) {
291
292
*/
292
293
// TODO make a telemetry HOC and move this stuff there
293
294
reportTelemetryEvent ( event ) {
294
- if ( this . props . onProjectTelemetryEvent ) {
295
- const metadata = collectMetadata ( this . props . vm , this . props . reduxProjectTitle , this . props . locale ) ;
296
- this . props . onProjectTelemetryEvent ( event , metadata ) ;
295
+ try {
296
+ if ( this . props . onProjectTelemetryEvent ) {
297
+ const metadata = collectMetadata ( this . props . vm , this . props . reduxProjectTitle , this . props . locale ) ;
298
+ this . props . onProjectTelemetryEvent ( event , metadata ) ;
299
+ }
300
+ } catch ( e ) {
301
+ log . error ( 'Telemetry error' , event , e ) ;
302
+ // This is intentionally fire/forget because a failure
303
+ // to report telemetry should not block saving
297
304
}
298
305
}
299
306
You can’t perform that action at this time.
0 commit comments