diff --git a/dbms/programs/server/HTTPHandler.cpp b/dbms/programs/server/HTTPHandler.cpp index b2b3298693e..10a7b662d38 100644 --- a/dbms/programs/server/HTTPHandler.cpp +++ b/dbms/programs/server/HTTPHandler.cpp @@ -610,6 +610,7 @@ void HTTPHandler::trySendExceptionToClient(const std::string & s, int exception_ { try { + response.set("X-ClickHouse-Exception-Code", toString(exception_code)); /// If HTTP method is POST and Keep-Alive is turned on, we should read the whole request body /// to avoid reading part of the current request body in the next request. if (request.getMethod() == Poco::Net::HTTPRequest::HTTP_POST