From 833c38edebac32c3b3de8f274dea4cf98b4901e9 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Sat, 11 Nov 2023 12:36:22 -0800 Subject: [PATCH] (fix) proxy raise exception when config path does not exist --- litellm/proxy/proxy_server.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 3ca81051844..a90a987bc07 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -205,11 +205,9 @@ def load_router_config(router: Optional[litellm.Router], config_file_path: str): with open(config_file_path, 'r') as file: config = yaml.safe_load(file) else: - pass + raise Exception(f"Path to config does not exist, 'os.path.exists({config_file_path})' returned False") except Exception as e: raise Exception(f"Exception while reading Config: {e}") - - pass print_verbose(f"Configs passed in, loaded config YAML\n{config}") ## LITELLM MODULE SETTINGS (e.g. litellm.drop_params=True,..)