forked from phoenix/litellm-mirror
fix(proxy_server.py): raise 422 error if no slack connection setup when calling /health/services
This commit is contained in:
parent
1ef19fbc9c
commit
cbd0851257
1 changed files with 5 additions and 0 deletions
|
@ -6514,6 +6514,11 @@ async def health_services_endpoint(
|
|||
|
||||
if "slack" in general_settings.get("alerting", []):
|
||||
await proxy_logging_obj.alerting_handler(message="This is a test", level="Low")
|
||||
else:
|
||||
raise HTTPException(
|
||||
status_code=422,
|
||||
detail={"error": "No slack connection setup. Unable to test this."},
|
||||
)
|
||||
|
||||
|
||||
@router.get("/health", tags=["health"], dependencies=[Depends(user_api_key_auth)])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue