Skip to content

Commit 917b683

Browse files
KSDaemonFrank-TXS
authored andcommitted
fix(clickhouse-driver): Fix headers check (cube-js#9746)
1 parent 0b52588 commit 917b683

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/cubejs-clickhouse-driver/src/ClickHouseDriver.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,9 @@ export class ClickHouseDriver extends BaseDriver implements DriverInterface {
268268
abort_signal: signal,
269269
});
270270

271-
if (resultSet.response_headers['x-clickhouse-format'] !== format) {
271+
// response_headers['x-clickhouse-format'] is optional, but if it exists,
272+
// it should match the requested format.
273+
if (resultSet.response_headers['x-clickhouse-format'] && resultSet.response_headers['x-clickhouse-format'] !== format) {
272274
throw new Error(`Unexpected x-clickhouse-format in response: expected ${format}, received ${resultSet.response_headers['x-clickhouse-format']}`);
273275
}
274276

0 commit comments

Comments
 (0)