Code and error message seem to be in conflict here:

if group_by IS present and limit is NOT?

should error read differently?