When you have Custom Connection and use SelectField, Connection screen becomes unusable (see #17064) 

We should detect the situation and throw an exception when Provider Info is initialized.
airflow/providers_manager.py
"""Retrieves all connections defined in the providers"""
        for name, provider in self._provider_dict.items():
            provider_package = name
            hook_class_names = provider[1].get("hook-class-names")
            if hook_class_names:
                for hook_class_name in hook_class_names:
                    self._add_hook(hook_class_name, provider_package)
    @staticmethod
    def _get_attr(obj: Any, attr_name: str):
        """Retrieves attributes of an object, or warns if not found"""
        if not hasattr(obj, attr_name):
            log.warning("The '%s' is missing %s attribute and cannot be registered", obj, attr_name)
            return None
        return getattr(obj, attr_name)
    def _add_hook(self, hook_class_name: str, provider_package: str) -> None: