As far as I understand ClickHouseExceptionSpecifier is trying to extract the code of DB::Exception from the error message generated by clickhouse-server. It should return new ClickHouseException initialized with that extracted code if extraction was successful.
Unfortunately it looks like actual error message format is different from the one getErrorCode() method is expecting:

So getErrorCode() returns -1 instead of actually received code. That means exception was not recognized, so specify() returns ClickHouseUnknownException instead of ClickHouseException(code).
Also I found the string of such format could be returned from Exception::getExceptionMessage (https://github.com/ClickHouse/ClickHouse/blob/master/src/Common/Exception.cpp)
Line 476: stream << "Code: " << e.code() << ". " << text;
So I suggest to look for dot as well as for comma in order to extract error code correctly.