v.18.16Improvement

Update: Return 400 Bad Request for Invalid Query Syntax

If the query syntax is invalid, the 400 Bad Request code is returned in the HTTP interface (500 was returned previously). 31bc680a
ClickHouse HTTP interface now returns 400 Bad Request for queries with invalid syntax instead of 500 Internal Server Error.

Why it matters

This change improves error handling by correctly indicating client-side errors when the query syntax is invalid, making it easier for users to diagnose and fix their queries without confusion caused by server error codes.

How to use it

Users do not need to enable anything explicitly. When sending queries via the HTTP interface, if the syntax is invalid, the server will respond with a 400 Bad Request status code automatically.