| 6 | namespace DB |
| 7 | { |
| 8 | void NotFoundHandler::handleRequest(HTTPServerRequest & request, HTTPServerResponse & response) |
| 9 | { |
| 10 | try |
| 11 | { |
| 12 | response.setStatusAndReason(Poco::Net::HTTPResponse::HTTP_NOT_FOUND); |
| 13 | *response.send() << "There is no handle " << request.getURI() << "\n\n" |
| 14 | << "Use / or /ping for health checks.\n" |
| 15 | << "Or /replicas_status for more sophisticated health checks.\n\n" |
| 16 | << "Send queries from your program with POST method or GET /?query=...\n\n" |
| 17 | << "Use clickhouse-client:\n\n" |
| 18 | << "For interactive data analysis:\n" |
| 19 | << " clickhouse-client\n\n" |
| 20 | << "For batch query processing:\n" |
| 21 | << " clickhouse-client --query='SELECT 1' > result\n" |
| 22 | << " clickhouse-client < query > result\n"; |
| 23 | } |
| 24 | catch (...) |
| 25 | { |
| 26 | tryLogCurrentException("NotFoundHandler"); |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | } |
nothing calls this directly
no test coverage detected