Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions packages/cubejs-clickhouse-driver/src/ClickHouseDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ export class ClickHouseDriver extends BaseDriver implements DriverInterface {
const results = await resultSet.json<Record<string, unknown>>();
return results;
} catch (e) {
throw new Error(`Query failed; query id: ${queryId}, SQL: ${query}`, { cause: e });
// TODO replace string formatting with proper cause
throw new Error(`Query failed; cause: ${e}; query id: ${queryId}; SQL: ${query}`);
}
});
}
Expand Down Expand Up @@ -407,7 +408,8 @@ export class ClickHouseDriver extends BaseDriver implements DriverInterface {
};
} catch (e) {
await client.close();
throw new Error(`Stream query failed; query id: ${queryId}, SQL: ${query}`, { cause: e });
// TODO replace string formatting with proper cause
throw new Error(`Stream query failed; cause: ${e}; query id: ${queryId}; SQL: ${query}`);
}
}

Expand Down Expand Up @@ -551,7 +553,8 @@ export class ClickHouseDriver extends BaseDriver implements DriverInterface {
try {
await this.command(createTableSql);
} catch (e) {
throw new Error(`Error during create table: ${createTableSql}`, { cause: e });
// TODO replace string formatting with proper cause
throw new Error(`Create table failed; cause: ${e}; SQL: ${createTableSql}`);
}
}

Expand Down
Loading