Skip to content

Commit 142a838

Browse files
Scott DoverScott Dover
authored andcommitted
chore: update error message
Signed-off-by: Scott Dover <Scott.Dover@sas.com>
1 parent 1638ca8 commit 142a838

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

client/src/components/ContentNavigator/const.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export const Messages = {
7575
FileDragFromTrashError: l10n.t("Unable to drag files from trash."),
7676
FileDropError: l10n.t('Unable to drop item "{name}".'),
7777
FileNavigationRootError: l10n.t(
78-
"Unable to load SAS Server files with provided fileNavigationRoot/fileNavigationCustomRootPath settings.",
78+
'SAS Server files cannot be loaded with the specified path "fileNavigationCustomRootPath: {path}"',
7979
),
8080
FileOpenError: l10n.t("The file type is unsupported."),
8181
FileRestoreError: l10n.t("Unable to restore file."),

client/src/connection/itc/ItcServerAdapter.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright © 2025, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
3-
import { FileType, Uri, workspace } from "vscode";
3+
import { FileType, Uri, l10n, workspace } from "vscode";
44

55
import { v4 } from "uuid";
66

@@ -162,7 +162,11 @@ class ItcServerAdapter implements ContentAdapter {
162162
);
163163
if (!success) {
164164
if (this.fileNavigationRoot === "CUSTOM") {
165-
throw new Error(Messages.FileNavigationRootError);
165+
throw new Error(
166+
l10n.t(Messages.FileNavigationRootError, {
167+
path: this.fileNavigationCustomRootPath,
168+
}),
169+
);
166170
}
167171
return [];
168172
}

client/src/connection/rest/RestServerAdapter.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright © 2024, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
3-
import { FileType, Uri } from "vscode";
3+
import { FileType, Uri, l10n } from "vscode";
44

55
import { AxiosResponse } from "axios";
66

@@ -247,7 +247,11 @@ class RestServerAdapter implements ContentAdapter {
247247
parentItem.uri === SAS_SERVER_HOME_DIRECTORY &&
248248
this.fileNavigationRoot === "CUSTOM"
249249
) {
250-
throw new Error(Messages.FileNavigationRootError);
250+
throw new Error(
251+
l10n.t(Messages.FileNavigationRootError, {
252+
path: this.fileNavigationCustomRootPath,
253+
}),
254+
);
251255
}
252256
throw error;
253257
}

0 commit comments

Comments
 (0)