Skip to content

Commit 3ab95a0

Browse files
committed
Fix REST traffic logging issue
1 parent 5b9e31e commit 3ab95a0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/api/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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)