v.20.3New Feature

Added X-ClickHouse-Exception-Code HTTP Header for Pre-Data Exception Handling

Added X-ClickHouse-Exception-Code HTTP header that is set if exception was thrown before sending data. This implements #4971. #8786 (Mikhail Korotov)
Added the X-ClickHouse-Exception-Code HTTP header to indicate exception codes when errors occur before any data is sent.

Why it matters

This feature addresses the issue of identifying exceptions that happen prior to data transmission in HTTP responses from ClickHouse. By including the exception code in the X-ClickHouse-Exception-Code header, clients can programmatically detect and handle errors more reliably without parsing the response body.

How to use it

When interacting with ClickHouse over HTTP, check the X-ClickHouse-Exception-Code response header. If an exception occurs before data is sent, this header will contain the corresponding exception code, enabling your client to react accordingly.