Skip to content

Commit b643b0c

Browse files
authored
fix(clickhouse-driver): Fix headers check (#9746)
1 parent f045af9 commit b643b0c

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)