MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / raise_config_error

Function raise_config_error

pymongo/common.py:176–181  ·  view source on GitHub ↗

Raise ConfigurationError with the given key name.

(key: str, suggestions: Optional[list[str]] = None)

Source from the content-addressed store, hash-verified

174
175
176def raise_config_error(key: str, suggestions: Optional[list[str]] = None) -> NoReturn:
177 """Raise ConfigurationError with the given key name."""
178 msg = f"Unknown option: {key}."
179 if suggestions:
180 msg += f" Did you mean one of ({', '.join(suggestions)}) or maybe a camelCase version of one? Refer to docstring."
181 raise ConfigurationError(msg)
182
183
184# Mapping of URI uuid representation options to valid subtypes.

Callers 1

_get_validatorFunction · 0.85

Calls 2

ConfigurationErrorClass · 0.90
joinMethod · 0.45

Tested by

no test coverage detected