Added InvalidQueryError and test for unsupported version