mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
test: fix raise
This commit is contained in:
parent
8dc53c0438
commit
63cb2764fe
3 changed files with 6 additions and 3 deletions
|
|
@ -923,8 +923,7 @@ async def generate_key_fn(
|
|||
litellm_changed_by=litellm_changed_by,
|
||||
team_table=team_table,
|
||||
)
|
||||
except HTTPException as e:
|
||||
raise e
|
||||
|
||||
except Exception as e:
|
||||
verbose_proxy_logger.exception(
|
||||
"litellm.proxy.proxy_server.generate_key_fn(): Exception occured - {}".format(
|
||||
|
|
|
|||
|
|
@ -1511,7 +1511,10 @@ def test_key_generate_with_custom_auth(prisma_client):
|
|||
asyncio.run(test())
|
||||
except Exception as e:
|
||||
print("Got Exception", e)
|
||||
print(e.message)
|
||||
if hasattr(e, "message"):
|
||||
print(e.message)
|
||||
else:
|
||||
print(e)
|
||||
pytest.fail(f"An exception occurred - {str(e)}")
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ from litellm.proxy._types import (
|
|||
LiteLLM_TeamTableCachedObj,
|
||||
LiteLLM_VerificationToken,
|
||||
LitellmUserRoles,
|
||||
ProxyException,
|
||||
UpdateKeyRequest,
|
||||
)
|
||||
from litellm.proxy.auth.user_api_key_auth import UserAPIKeyAuth
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue