Improve the exception message if the "connect" method of a ControllerProviderInterface returns an invalid type.