refac: toast error

This commit is contained in:
Timothy Jaeryang Baek committed 2025-01-20 22:41:32 -08:00
1 parent af48f346f1
commit a863f98c53
52 files changed
+123 -123

No files matched your search

@@ -37,7 +37,7 @@
},
params: { ...modelInfo.params }
}).catch((error) => {
toast.error(error);
toast.error(`${error}`);
return null;
});
@@ -12,7 +12,7 @@
let prompt = null;
const onSubmit = async (_prompt) => {
const prompt = await createNewPrompt(localStorage.token, _prompt).catch((error) => {
toast.error(error);
toast.error(`${error}`);
return null;
});
@@ -15,7 +15,7 @@
const onSubmit = async (_prompt) => {
console.log(_prompt);
const prompt = await updatePromptByCommand(localStorage.token, _prompt).catch((error) => {
toast.error(error);
toast.error(`${error}`);
return null;
});
@@ -33,7 +33,7 @@
localStorage.token,
command.replace(/\//g, '')
).catch((error) => {
toast.error(error);
toast.error(`${error}`);
return null;
});
@@ -39,7 +39,7 @@
content: data.content,
access_control: data.access_control
}).catch((error) => {
toast.error(error);
toast.error(`${error}`);
return null;
});
@@ -39,7 +39,7 @@
content: data.content,
access_control: data.access_control
}).catch((error) => {
toast.error(error);
toast.error(`${error}`);
return null;
});
@@ -57,7 +57,7 @@
if (id) {
tool = await getToolById(localStorage.token, id).catch((error) => {
toast.error(error);
toast.error(`${error}`);
goto('/workspace/tools');
return null;
});