mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
Merge branch 'main' into litellm_test_slack_alerts
This commit is contained in:
commit
9fea8e7152
1 changed files with 3 additions and 3 deletions
|
@ -6513,9 +6513,11 @@ async def health_services_endpoint(
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if "slack" in general_settings.get("alerting", []):
|
if "slack" in general_settings.get("alerting", []):
|
||||||
|
test_message = f"""\n🚨 `ProjectedLimitExceededError` 💸\n\n`Key Alias:` my-secret-project \n`Expected Day of Error`: 28th March \n`Current Spend`: 100 \n`Projected Spend at end of month`: 1000 \n"""
|
||||||
await proxy_logging_obj.alerting_handler(
|
await proxy_logging_obj.alerting_handler(
|
||||||
message="This is a test", level="Low"
|
message=test_message, level="Low"
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
|
@ -6539,8 +6541,6 @@ async def health_services_endpoint(
|
||||||
type="auth_error",
|
type="auth_error",
|
||||||
param=getattr(e, "param", "None"),
|
param=getattr(e, "param", "None"),
|
||||||
code=status.HTTP_401_UNAUTHORIZED,
|
code=status.HTTP_401_UNAUTHORIZED,
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@router.get("/health", tags=["health"], dependencies=[Depends(user_api_key_auth)])
|
@router.get("/health", tags=["health"], dependencies=[Depends(user_api_key_auth)])
|
||||||
async def health_endpoint(
|
async def health_endpoint(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue