fix: raise correct error

This commit is contained in:
Krrish Dholakia 2024-04-03 22:37:51 -07:00
parent 20849cbbfc
commit 346cd1876b
2 changed files with 8 additions and 1 deletions

View file

@ -6800,6 +6800,13 @@ async def add_new_model(
"updated_by": user_api_key_dict.user_id or litellm_proxy_admin_name,
}
)
else:
raise HTTPException(
status_code=500,
detail={
"error": "Set `store_model_in_db: true` in general_settings on your config.yaml"
},
)
return {"message": "Model added successfully"}
except Exception as e:

View file

@ -194,7 +194,7 @@ def test_img_gen(client_no_auth):
#### ADDITIONAL
# @pytest.mark.skip(reason="hitting yaml load issues on circle-ci")
@pytest.mark.skip(reason="test via docker tests. Requires prisma client.")
def test_add_new_model(client_no_auth):
global headers
try: