Skip to content

Commit

Permalink
Merge pull request intersystems-community#178 from gjsjohnmurray/fix-177
Browse files Browse the repository at this point in the history
Fix `Cannot read properties of undefined (reading 'content')`
  • Loading branch information
gjsjohnmurray authored May 11, 2023
2 parents 4e63880 + bbe302a commit 139b30e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ui/serverManagerView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ async function serverFeatures(element: ServerTreeItem, params?: any): Promise<Fe
}

const response = await makeRESTRequest("HEAD", serverSpec);
if (!response) {
if (!response || response.status !== 200) {
children.push(new OfflineTreeItem({ parent: element, label: name, id: name }, element.name));
credentialCache[name] = undefined;
} else {
Expand Down Expand Up @@ -453,7 +453,7 @@ async function serverNamespaces(element: ServerTreeItem, params?: any): Promise<
}

const response = await makeRESTRequest("GET", serverSpec);
if (!response) {
if (!response || response.status !== 200) {
children.push(new OfflineTreeItem({ parent: element, label: name, id: name }, element.name));
credentialCache[params.serverName] = undefined;
} else {
Expand Down

0 comments on commit 139b30e

Please sign in to comment.