v.22.6Improvement
Modify HTTP Endpoint for Improved Status Reporting and Error Handling
Modify the HTTP Endpoint to return the full stats under theX-ClickHouse-Summaryheader whensend_progress_in_http_headers=0(before it would return all zeros). - Modify the HTTP Endpoint to returnX-ClickHouse-Exception-Codeheader when progress has been sent before (send_progress_in_http_headers=1) - Modify the HTTP Endpoint to returnHTTP_REQUEST_TIMEOUT(408) instead ofHTTP_INTERNAL_SERVER_ERROR(500) onTIMEOUT_EXCEEDEDerrors. #36884 (Raúl Marín).
Why it matters
Previously, whensend_progress_in_http_headers=0, the HTTP endpoint returned zeroed stats in the X-ClickHouse-Summary header. This update ensures full statistics are returned, improving observability. Additionally, it adds the X-ClickHouse-Exception-Code header when progress is sent via headers (send_progress_in_http_headers=1) for better error identification. The HTTP status code for timeout errors is changed from 500 to the more appropriate 408, improving error handling accuracy.How to use it
To enable full stats in HTTP response headers, setsend_progress_in_http_headers=0. When set to 1, you will receive the X-ClickHouse-Exception-Code header upon errors. Timeout errors during HTTP requests will now return the 408 status code automatically without additional configuration.