forked from phoenix/litellm-mirror
raise exception when prisma init fails
This commit is contained in:
parent
8f8237a1a0
commit
599318b40e
1 changed files with 6 additions and 4 deletions
|
@ -311,6 +311,7 @@ def prisma_setup(database_url: Optional[str]):
|
|||
database_url=database_url, proxy_logging_obj=proxy_logging_obj
|
||||
)
|
||||
except Exception as e:
|
||||
raise e
|
||||
verbose_proxy_logger.debug(
|
||||
f"Error when initializing prisma, Ensure you run pip install prisma {str(e)}"
|
||||
)
|
||||
|
@ -510,10 +511,9 @@ class ProxyConfig:
|
|||
def is_yaml(self, config_file_path: str) -> bool:
|
||||
if not os.path.isfile(config_file_path):
|
||||
return False
|
||||
|
||||
|
||||
_, file_extension = os.path.splitext(config_file_path)
|
||||
return file_extension.lower() == '.yaml' or file_extension.lower() == '.yml'
|
||||
|
||||
return file_extension.lower() == ".yaml" or file_extension.lower() == ".yml"
|
||||
|
||||
async def get_config(self, config_file_path: Optional[str] = None) -> dict:
|
||||
global prisma_client, user_config_file_path
|
||||
|
@ -1169,7 +1169,9 @@ async def startup_event():
|
|||
llm_router,
|
||||
llm_model_list,
|
||||
general_settings,
|
||||
) = await proxy_config.load_config(router=llm_router, config_file_path=worker_config)
|
||||
) = await proxy_config.load_config(
|
||||
router=llm_router, config_file_path=worker_config
|
||||
)
|
||||
else:
|
||||
await initialize(**worker_config)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue