Skip to content

not_configured

Used as a placeholder for providers that require configuration.

Parameters:

Name Type Description Default
error_message str

str. The error message to raise with the exception.

required
Source code in event_sourcery/_event_store/backend.py
def not_configured(error_message: str) -> _Provider[T]:
    """
    Used as a placeholder for providers that require configuration.

    Args:
        error_message (str): str. The error message to raise with the exception.
    """

    def _raise(container: "_Container") -> NoReturn:
        raise NoProviderConfigured(error_message)  # pragma: no cover

    return _raise