mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
(ui) link to slack docs to test soft limit budget alerts
This commit is contained in:
parent
ebaf2eef1f
commit
169b085e9c
2 changed files with 13 additions and 7 deletions
|
@ -818,6 +818,7 @@ export const slackBudgetAlertsHealthCheck = async (accessToken: String) => {
|
|||
: `health/services?service=slack_budget_alerts`;
|
||||
|
||||
console.log("Checking Slack Budget Alerts service health");
|
||||
message.info("Sending Test Slack alert...");
|
||||
|
||||
const response = await fetch(url, {
|
||||
method: "GET",
|
||||
|
@ -829,11 +830,13 @@ export const slackBudgetAlertsHealthCheck = async (accessToken: String) => {
|
|||
|
||||
if (!response.ok) {
|
||||
const errorData = await response.text();
|
||||
console.error("Health Check failed:", errorData);
|
||||
throw new Error("Health Check failed");
|
||||
message.error("Failed Slack Alert test: " + errorData);
|
||||
// throw error with message
|
||||
throw new Error(errorData);
|
||||
}
|
||||
|
||||
|
||||
const data = await response.json();
|
||||
message.success("Test Slack Alert worked - check your Slack!");
|
||||
console.log("Service Health Response:", data);
|
||||
|
||||
// You can add additional logic here based on the response if needed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue