Skip to content

Commit 3134001

Browse files
superServer sub-object of intersystems.servers entry is optional (#1490)
* `superServer` sub-object of `intersystems.servers` entry is optional * Fix REST traffic logging issue
1 parent 5f7402d commit 3134001

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/api/index.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ export class AtelierAPI {
224224
ns,
225225
host,
226226
port,
227-
superserverPort: superServer.port,
227+
superserverPort: superServer?.port,
228228
username,
229229
password,
230230
pathPrefix,
@@ -256,7 +256,7 @@ export class AtelierAPI {
256256
ns,
257257
host,
258258
port,
259-
superserverPort: superServer.port,
259+
superserverPort: superServer?.port,
260260
username,
261261
password,
262262
pathPrefix,
@@ -379,7 +379,9 @@ export class AtelierAPI {
379379
let cookie;
380380
let reqTs: Date;
381381
const outputRequest = () => {
382-
outputChannel.appendLine(`+- REQUEST - ${reqTs.toLocaleTimeString()} ----------------------------`);
382+
outputChannel.appendLine(
383+
`+- REQUEST - ${(reqTs ?? new Date()).toLocaleTimeString()} ----------------------------`
384+
);
383385
outputChannel.appendLine(`${method} ${proto}://${host}:${port}${path}`);
384386
if (cookie) outputChannel.appendLine("COOKIE: <value>");
385387
for (const [h, v] of Object.entries(headers)) {

0 commit comments

Comments
 (0)