@@ -38,7 +38,7 @@ import { ISessionService } from './services/sessionService';
3838import { ILogService } from './services/logService' ;
3939import { IHostService } from './services/hostService' ;
4040import { Configuration } from './configuration' ;
41- import { getServiceURL } from './common/utils' ;
41+ import { WrapError , getServiceURL } from './common/utils' ;
4242import { ILocalSSHService } from './services/localSSHService' ;
4343
4444interface LocalAppConfig {
@@ -720,9 +720,9 @@ export class RemoteConnector extends Disposable {
720720
721721 this . telemetryService . sendUserFlowStatus ( 'connected' , localSSHFlow ) ;
722722 } catch ( e ) {
723- const reason = ( typeof e ?. code === 'string' ) ? e . code : 'Unknown' ;
723+ const reason = e ?. code ? e . code : 'Unknown' ;
724724 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 } ) ;
726726 }
727727 this . telemetryService . sendUserFlowStatus ( 'failed' , { ...localSSHFlow , reason } ) ;
728728 this . logService . error ( `Local SSH: failed to connect to ${ params . workspaceId } Gitpod workspace:` , e ) ;
@@ -748,9 +748,9 @@ export class RemoteConnector extends Disposable {
748748
749749 this . telemetryService . sendUserFlowStatus ( 'connected' , gatewayFlow ) ;
750750 } catch ( e ) {
751- const reason = ( typeof e ?. code === 'string' ) ? e . code : 'Unknown' ;
751+ const reason = e ?. code ? e . code : 'Unknown' ;
752752 if ( reason === 'Unknown' ) {
753- this . telemetryService . sendTelemetryException ( e , { ...gatewayFlow } ) ;
753+ this . telemetryService . sendTelemetryException ( new WrapError ( 'Gateway: failed to connect to workspace' , e , 'Unknown' ) , { ...gatewayFlow } ) ;
754754 }
755755 this . telemetryService . sendUserFlowStatus ( 'failed' , { ...gatewayFlow , reason } ) ;
756756 if ( e instanceof NoSSHGatewayError ) {
@@ -804,9 +804,9 @@ export class RemoteConnector extends Disposable {
804804
805805 this . telemetryService . sendUserFlowStatus ( 'connected' , localAppFlow ) ;
806806 } catch ( e ) {
807- const reason = ( typeof e ?. code === 'string' ) ? e . code : 'Unknown' ;
807+ const reason = e ?. code ? e . code : 'Unknown' ;
808808 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 } ) ;
810810 }
811811 this . telemetryService . sendUserFlowStatus ( 'failed' , { reason, ...localAppFlow } ) ;
812812 this . logService . error ( `Failed to connect ${ params . workspaceId } Gitpod workspace:` , e ) ;
0 commit comments