Raise InvalidMessage instead of yielding ''