File tree 1 file changed +19
-1
lines changed
1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,25 @@ Sentry.init({
66
66
67
67
let mainWindow : BrowserWindow | null ;
68
68
let updateStream : grpc . ClientReadableStream < ConnectionStatusUpdate > | undefined ;
69
- const cliProcess = child_process . spawn ( pomeriumCli , [ 'api' ] ) ;
69
+
70
+ const cliProcess = child_process
71
+ . spawn ( pomeriumCli , [ 'api' ] )
72
+ . on ( 'error' , ( error ) => {
73
+ Sentry . captureEvent ( {
74
+ message : 'API process failed to start' ,
75
+ extra : { error } ,
76
+ } ) ;
77
+ } )
78
+ . on ( 'close' , ( code , signal ) => {
79
+ if ( signal != null ) return ;
80
+ Sentry . captureEvent ( {
81
+ message : 'API process unexpectedly quit' ,
82
+ extra : { code } ,
83
+ } ) ;
84
+ } ) ;
85
+
86
+ cliProcess . stderr . on ( 'data' , ( data ) => console . error ( data . toString ( ) ) ) ;
87
+ cliProcess . stdout . on ( 'data' , ( data ) => console . info ( data . toString ( ) ) ) ;
70
88
class AppUpdater {
71
89
constructor ( ) {
72
90
log . transports . file . level = 'info' ;
You can’t perform that action at this time.
0 commit comments