mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-05 01:25:38 -05:00
Maddy/prompt password when different (#4537)
* Prompt for password once when the sql instance password doesn't work for hdfs. If the user provides the correct password, connect and continue, else show Unauthorized node. * Removed the hardcoded bad password * Added check for empty folder scenarios * Added ErrorStatusCode as property of TreeNode. Checking for the error code instead of the error string to avoid localization issues * type fixed * implemented hasExpansionError
This commit is contained in:
@@ -136,7 +136,7 @@ export class FolderNode extends HdfsFileSourceNode {
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
this.children = [ErrorNode.create(localize('errorExpanding', 'Error: {0}', utils.getErrorMessage(error)), this)];
|
||||
this.children = [ErrorNode.create(localize('errorExpanding', 'Error: {0}', utils.getErrorMessage(error)), this, error.statusCode)];
|
||||
}
|
||||
}
|
||||
return this.children;
|
||||
@@ -342,9 +342,12 @@ export class ErrorNode extends TreeNode {
|
||||
super();
|
||||
}
|
||||
|
||||
public static create(message: string, parent: TreeNode): ErrorNode {
|
||||
public static create(message: string, parent: TreeNode, errorCode?: number): ErrorNode {
|
||||
let node = new ErrorNode(message);
|
||||
node.parent = parent;
|
||||
if(errorCode){
|
||||
node.errorStatusCode = errorCode;
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user