@@ -38,7 +38,7 @@ import { ISessionService } from './services/sessionService';
38
38
import { ILogService } from './services/logService' ;
39
39
import { IHostService } from './services/hostService' ;
40
40
import { Configuration } from './configuration' ;
41
- import { getServiceURL } from './common/utils' ;
41
+ import { WrapError , getServiceURL } from './common/utils' ;
42
42
import { ILocalSSHService } from './services/localSSHService' ;
43
43
44
44
interface LocalAppConfig {
@@ -720,9 +720,9 @@ export class RemoteConnector extends Disposable {
720
720
721
721
this . telemetryService . sendUserFlowStatus ( 'connected' , localSSHFlow ) ;
722
722
} catch ( e ) {
723
- const reason = ( typeof e ?. code === 'string' ) ? e . code : 'Unknown' ;
723
+ const reason = e ?. code ? e . code : 'Unknown' ;
724
724
if ( reason === 'Unknown' ) {
725
- this . telemetryService . sendTelemetryException ( e , { ...localSSHFlow } ) ;
725
+ this . telemetryService . sendTelemetryException ( new WrapError ( 'Local SSH: failed to connect to workspace' , e , 'Unknown' ) , { ...localSSHFlow } ) ;
726
726
}
727
727
this . telemetryService . sendUserFlowStatus ( 'failed' , { ...localSSHFlow , reason } ) ;
728
728
this . logService . error ( `Local SSH: failed to connect to ${ params . workspaceId } Gitpod workspace:` , e ) ;
@@ -748,9 +748,9 @@ export class RemoteConnector extends Disposable {
748
748
749
749
this . telemetryService . sendUserFlowStatus ( 'connected' , gatewayFlow ) ;
750
750
} catch ( e ) {
751
- const reason = ( typeof e ?. code === 'string' ) ? e . code : 'Unknown' ;
751
+ const reason = e ?. code ? e . code : 'Unknown' ;
752
752
if ( reason === 'Unknown' ) {
753
- this . telemetryService . sendTelemetryException ( e , { ...gatewayFlow } ) ;
753
+ this . telemetryService . sendTelemetryException ( new WrapError ( 'Gateway: failed to connect to workspace' , e , 'Unknown' ) , { ...gatewayFlow } ) ;
754
754
}
755
755
this . telemetryService . sendUserFlowStatus ( 'failed' , { ...gatewayFlow , reason } ) ;
756
756
if ( e instanceof NoSSHGatewayError ) {
@@ -804,9 +804,9 @@ export class RemoteConnector extends Disposable {
804
804
805
805
this . telemetryService . sendUserFlowStatus ( 'connected' , localAppFlow ) ;
806
806
} catch ( e ) {
807
- const reason = ( typeof e ?. code === 'string' ) ? e . code : 'Unknown' ;
807
+ const reason = e ?. code ? e . code : 'Unknown' ;
808
808
if ( reason === 'Unknown' ) {
809
- this . telemetryService . sendTelemetryException ( e , { ...localAppFlow } ) ;
809
+ this . telemetryService . sendTelemetryException ( new WrapError ( 'Local APP: failed to connect to workspace' , e , 'Unknown' ) , { ...localAppFlow } ) ;
810
810
}
811
811
this . telemetryService . sendUserFlowStatus ( 'failed' , { reason, ...localAppFlow } ) ;
812
812
this . logService . error ( `Failed to connect ${ params . workspaceId } Gitpod workspace:` , e ) ;
0 commit comments