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
"""
        Parses found provider.yaml file and adds found provider to the dictionary.
        :param path: full file path of the provider.yaml file
        :param package_name: name of the package
        """
        try:
            log.debug("Loading %s from %s", package_name, path)
            with open(path) as provider_yaml_file:
                provider_info = yaml.safe_load(provider_yaml_file)
            self._provider_schema_validator.validate(provider_info)
            version = provider_info['versions'][0]
            if package_name not in self._provider_dict:
                self._provider_dict[package_name] = ProviderInfo(version, provider_info)
            else:
                log.warning(
                    "The providers for package '%s' could not be registered because providers for that "
                    "package name have already been registered",
                    package_name,
                )
        except Exception as e:
            log.warning("Error when loading '%s': %s", path, e)
    def _discover_hooks(self) -> None: