Skip to content

Commit 9807b1e

Browse files
committed
fix(api-gateway): getTime on undefined call in case of web socket auth error
1 parent 90a7472 commit 9807b1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/cubejs-api-gateway/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ class ApiGateway {
258258
}
259259

260260
duration(requestStarted) {
261-
return new Date().getTime() - requestStarted.getTime();
261+
return requestStarted && (new Date().getTime() - requestStarted.getTime());
262262
}
263263

264264
async meta({ context, res }) {

0 commit comments

Comments
 (0)