Null Check for errorNumber (#21586)

This commit is contained in:
Cheena Malhotra
2023-01-12 18:27:10 -08:00
committed by GitHub
parent 49c46cee20
commit 3239bb429f

View File

@@ -1155,7 +1155,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
}
} else {
connection.connectHandler(false, info.errorMessage, info.errorNumber, info.messages);
this._telemetryService.createErrorEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.TelemetryError.DatabaseConnectionError, info.errorNumber.toString())
this._telemetryService.createErrorEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.TelemetryError.DatabaseConnectionError, info.errorNumber?.toString())
.withConnectionInfo(connection.connectionProfile)
.withAdditionalMeasurements({
extensionConnectionTimeMs: connection.extensionTimer.elapsed() - connection.serviceTimer.elapsed(),