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 {
122
122
return cn . toString ( ) ;
123
123
}
124
124
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 > {
130
126
let lastError : Error | undefined = undefined ;
131
127
132
128
logger . debug (
@@ -166,7 +162,11 @@ export class ConnectClusterTool extends AtlasToolBase {
166
162
}
167
163
168
164
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
+ ) {
170
170
void this . session . apiClient
171
171
. deleteDatabaseUser ( {
172
172
params : {
@@ -218,7 +218,7 @@ export class ConnectClusterTool extends AtlasToolBase {
218
218
default :
219
219
await this . session . disconnect ( ) ;
220
220
const connectionString = await this . prepareClusterConnection ( projectId , clusterName ) ;
221
-
221
+
222
222
// try to connect for about 5 minutes asynchronously
223
223
void this . connectToCluster ( projectId , clusterName , connectionString ) . catch ( ( err : unknown ) => {
224
224
const error = err instanceof Error ? err : new Error ( String ( err ) ) ;
You can’t perform that action at this time.
0 commit comments