File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -122,11 +122,7 @@ export class ConnectClusterTool extends AtlasToolBase {
122122 return cn . toString ( ) ;
123123 }
124124
125- private async connectToCluster (
126- projectId : string ,
127- clusterName : string ,
128- connectionString : string
129- ) : Promise < void > {
125+ private async connectToCluster ( projectId : string , clusterName : string , connectionString : string ) : Promise < void > {
130126 let lastError : Error | undefined = undefined ;
131127
132128 logger . debug (
@@ -166,7 +162,11 @@ export class ConnectClusterTool extends AtlasToolBase {
166162 }
167163
168164 if ( lastError ) {
169- if ( this . session . connectedAtlasCluster ?. projectId == projectId && this . session . connectedAtlasCluster ?. clusterName == clusterName && this . session . connectedAtlasCluster ?. username ) {
165+ if (
166+ this . session . connectedAtlasCluster ?. projectId == projectId &&
167+ this . session . connectedAtlasCluster ?. clusterName == clusterName &&
168+ this . session . connectedAtlasCluster ?. username
169+ ) {
170170 void this . session . apiClient
171171 . deleteDatabaseUser ( {
172172 params : {
@@ -218,7 +218,7 @@ export class ConnectClusterTool extends AtlasToolBase {
218218 default :
219219 await this . session . disconnect ( ) ;
220220 const connectionString = await this . prepareClusterConnection ( projectId , clusterName ) ;
221-
221+
222222 // try to connect for about 5 minutes asynchronously
223223 void this . connectToCluster ( projectId , clusterName , connectionString ) . catch ( ( err : unknown ) => {
224224 const error = err instanceof Error ? err : new Error ( String ( err ) ) ;
You can’t perform that action at this time.
0 commit comments