From c35c137ac1a1f902adce475dea9731614cc07b3e Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Sun, 12 Jan 2025 08:53:03 -0800 Subject: [PATCH] fix(proxy_server.py): add exception to debug --- litellm/proxy/proxy_server.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 17b17687aef..8002863217d 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -1653,7 +1653,15 @@ class ProxyConfig: Do this, to avoid mutating the config state outside of allowed methods """ - return copy.deepcopy(self.config) + try: + return copy.deepcopy(self.config) + except Exception as e: + verbose_proxy_logger.debug( + "ProxyConfig:get_config_state(): Error returning copy of config state. self.config={}\nError: {}".format( + self.config, e + ) + ) + return {} async def load_config( # noqa: PLR0915 self, router: Optional[litellm.Router], config_file_path: str