Skip to content

Commit 63923e4

Browse files
committed
query
1 parent 65ed659 commit 63923e4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/cubejs-api-gateway/src/gateway.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,8 @@ class ApiGateway {
381381
`${this.basePath}/v1/cubesql`,
382382
userMiddlewares,
383383
userAsyncHandler(async (req, res) => {
384+
const { query } = req.body;
385+
384386
const requestStarted = new Date();
385387

386388
res.setHeader('Content-Type', 'application/json');
@@ -389,8 +391,6 @@ class ApiGateway {
389391
try {
390392
await this.assertApiScope('data', req.context?.securityContext);
391393

392-
const { query } = req.body;
393-
394394
this.log({
395395
type: 'Load Request',
396396
query: {
@@ -420,6 +420,9 @@ class ApiGateway {
420420
} catch (e: any) {
421421
this.handleError({
422422
e,
423+
query: {
424+
sql: query,
425+
},
423426
context: req.context,
424427
res: this.resToResultFn(res),
425428
requestStarted

0 commit comments

Comments
 (0)