forked from phoenix/litellm-mirror
fix: raise correct error
This commit is contained in:
parent
20849cbbfc
commit
346cd1876b
2 changed files with 8 additions and 1 deletions
|
@ -6800,6 +6800,13 @@ async def add_new_model(
|
||||||
"updated_by": user_api_key_dict.user_id or litellm_proxy_admin_name,
|
"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"}
|
return {"message": "Model added successfully"}
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
|
@ -194,7 +194,7 @@ def test_img_gen(client_no_auth):
|
||||||
|
|
||||||
|
|
||||||
#### ADDITIONAL
|
#### 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):
|
def test_add_new_model(client_no_auth):
|
||||||
global headers
|
global headers
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue