mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
refac: toast error
This commit is contained in:
@@ -229,7 +229,7 @@
|
||||
sentence
|
||||
).catch((error) => {
|
||||
console.error(error);
|
||||
toast.error(error);
|
||||
toast.error(`${error}`);
|
||||
|
||||
speaking = false;
|
||||
loadingSpeech = false;
|
||||
@@ -321,7 +321,7 @@
|
||||
const generateImage = async (message: MessageType) => {
|
||||
generatingImage = true;
|
||||
const res = await imageGenerations(localStorage.token, message.content).catch((error) => {
|
||||
toast.error(error);
|
||||
toast.error(`${error}`);
|
||||
});
|
||||
console.log(res);
|
||||
|
||||
@@ -356,7 +356,7 @@
|
||||
};
|
||||
|
||||
const chat = await getChatById(localStorage.token, chatId).catch((error) => {
|
||||
toast.error(error);
|
||||
toast.error(`${error}`);
|
||||
});
|
||||
if (!chat) {
|
||||
return;
|
||||
@@ -411,11 +411,11 @@
|
||||
message.feedbackId,
|
||||
feedbackItem
|
||||
).catch((error) => {
|
||||
toast.error(error);
|
||||
toast.error(`${error}`);
|
||||
});
|
||||
} else {
|
||||
feedback = await createNewFeedback(localStorage.token, feedbackItem).catch((error) => {
|
||||
toast.error(error);
|
||||
toast.error(`${error}`);
|
||||
});
|
||||
|
||||
if (feedback) {
|
||||
@@ -451,7 +451,7 @@
|
||||
updatedMessage.feedbackId,
|
||||
feedbackItem
|
||||
).catch((error) => {
|
||||
toast.error(error);
|
||||
toast.error(`${error}`);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user