Include query itself in invalid query exception.