From 2030e4764fb78cf3fb4c8033212930aebbd3dfd4 Mon Sep 17 00:00:00 2001 From: Achal Shah Date: Mon, 21 Jun 2021 14:24:29 -0700 Subject: [PATCH] Generic error class Signed-off-by: Achal Shah --- sdk/python/feast/errors.py | 4 ++-- sdk/python/feast/repo_config.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/python/feast/errors.py b/sdk/python/feast/errors.py index e3d4d69856..d7cb3ecd37 100644 --- a/sdk/python/feast/errors.py +++ b/sdk/python/feast/errors.py @@ -86,9 +86,9 @@ def __init__(self, online_store_class_name: str): class FeastStoreConfigInvalidName(Exception): - def __init__(self, online_store_config_class_name: str, store_type="Online"): + def __init__(self, store_config_class_name: str, store_type: str): super().__init__( - f"Online Store Config Class '{online_store_config_class_name}' " + f"Config Class '{store_config_class_name}' " f"should end with the string `{store_type}Config`.'" ) diff --git a/sdk/python/feast/repo_config.py b/sdk/python/feast/repo_config.py index 26063e9a35..55a9af35cb 100644 --- a/sdk/python/feast/repo_config.py +++ b/sdk/python/feast/repo_config.py @@ -189,7 +189,7 @@ def get_config_class_from_type( module_name: str, config_class_name: str, store_type: str ): if not config_class_name.endswith(f"{store_type}Config"): - raise errors.FeastStoreConfigInvalidName(config_class_name) + raise errors.FeastStoreConfigInvalidName(config_class_name, store_type) # Try importing the module that contains the custom provider try: