Changes expected error code for query without geometry