File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -83,13 +83,15 @@ export abstract class MongoClusterItemBase
83
83
84
84
// If authentication failed, return the error element
85
85
if ( ! mongoClustersClient ) {
86
+ ext . outputChannel . appendLine ( `MongoDB Clusters: Failed to authenticate with "${ this . mongoCluster . name } ".` ) ;
86
87
return [
87
88
createGenericElement ( {
88
89
contextValue : 'error' ,
89
90
id : `${ this . id } /error` ,
90
91
label : 'Failed to authenticate (click to retry)' ,
91
92
iconPath : new vscode . ThemeIcon ( 'error' ) ,
92
- commandId : 'azureResourceGroups.refreshTree' ,
93
+ commandId : 'azureDatabases.refresh' ,
94
+ commandArgs : [ this ] ,
93
95
} ) as CosmosDBTreeElement ,
94
96
] ;
95
97
}
Original file line number Diff line number Diff line change @@ -128,7 +128,10 @@ export class MongoClusterResourceItem extends MongoClusterItemBase {
128
128
mongoClustersClient = await MongoClustersClient . getClient ( this . id ) . catch ( ( error : Error ) => {
129
129
ext . outputChannel . appendLine ( `Error: ${ error . message } ` ) ;
130
130
131
- void vscode . window . showErrorMessage ( `Failed to connect: ${ error . message } ` ) ;
131
+ void vscode . window . showErrorMessage ( `Failed to connect to "${ this . mongoCluster . name } "` , {
132
+ modal : true ,
133
+ detail : `Revisit connection details and try again.\n\nError: ${ error . message } ` ,
134
+ } ) ;
132
135
133
136
throw error ;
134
137
} ) ;
Original file line number Diff line number Diff line change @@ -98,7 +98,10 @@ export class MongoClusterWorkspaceItem extends MongoClusterItemBase {
98
98
ext . outputChannel . appendLine ( 'failed.' ) ;
99
99
ext . outputChannel . appendLine ( `Error: ${ error . message } ` ) ;
100
100
101
- void vscode . window . showErrorMessage ( `Failed to connect: ${ error . message } ` ) ;
101
+ void vscode . window . showErrorMessage ( `Failed to connect to "${ this . mongoCluster . name } "` , {
102
+ modal : true ,
103
+ detail : `Revisit connection details and try again.\n\nError: ${ error . message } ` ,
104
+ } ) ;
102
105
103
106
throw error ;
104
107
} ) ;
You can’t perform that action at this time.
0 commit comments