|
@@ -149,7 +149,7 @@
|
|
|
|
|
|
try {
|
|
|
const uploadedFile = await uploadFile(localStorage.token, file).catch((e) => {
|
|
|
- toast.error(e);
|
|
|
+ toast.error(`${e}`);
|
|
|
return null;
|
|
|
});
|
|
|
|
|
@@ -169,7 +169,7 @@
|
|
|
toast.error($i18n.t('Failed to upload file.'));
|
|
|
}
|
|
|
} catch (e) {
|
|
|
- toast.error(e);
|
|
|
+ toast.error(`${e}`);
|
|
|
}
|
|
|
};
|
|
|
|
|
@@ -339,7 +339,7 @@
|
|
|
const syncDirectoryHandler = async () => {
|
|
|
if ((knowledge?.files ?? []).length > 0) {
|
|
|
const res = await resetKnowledgeById(localStorage.token, id).catch((e) => {
|
|
|
- toast.error(e);
|
|
|
+ toast.error(`${e}`);
|
|
|
});
|
|
|
|
|
|
if (res) {
|
|
@@ -357,7 +357,7 @@
|
|
|
const addFileHandler = async (fileId) => {
|
|
|
const updatedKnowledge = await addFileToKnowledgeById(localStorage.token, id, fileId).catch(
|
|
|
(e) => {
|
|
|
- toast.error(e);
|
|
|
+ toast.error(`${e}`);
|
|
|
return null;
|
|
|
}
|
|
|
);
|
|
@@ -386,7 +386,7 @@
|
|
|
}
|
|
|
} catch (e) {
|
|
|
console.error('Error in deleteFileHandler:', e);
|
|
|
- toast.error(e);
|
|
|
+ toast.error(`${e}`);
|
|
|
}
|
|
|
};
|
|
|
|
|
@@ -395,7 +395,7 @@
|
|
|
const content = selectedFile.data.content;
|
|
|
|
|
|
const res = updateFileDataContentById(localStorage.token, fileId, content).catch((e) => {
|
|
|
- toast.error(e);
|
|
|
+ toast.error(`${e}`);
|
|
|
});
|
|
|
|
|
|
const updatedKnowledge = await updateFileFromKnowledgeById(
|
|
@@ -403,7 +403,7 @@
|
|
|
id,
|
|
|
fileId
|
|
|
).catch((e) => {
|
|
|
- toast.error(e);
|
|
|
+ toast.error(`${e}`);
|
|
|
});
|
|
|
|
|
|
if (res && updatedKnowledge) {
|
|
@@ -430,7 +430,7 @@
|
|
|
description: knowledge.description,
|
|
|
access_control: knowledge.access_control
|
|
|
}).catch((e) => {
|
|
|
- toast.error(e);
|
|
|
+ toast.error(`${e}`);
|
|
|
});
|
|
|
|
|
|
if (res) {
|
|
@@ -522,7 +522,7 @@
|
|
|
id = $page.params.id;
|
|
|
|
|
|
const res = await getKnowledgeById(localStorage.token, id).catch((e) => {
|
|
|
- toast.error(e);
|
|
|
+ toast.error(`${e}`);
|
|
|
return null;
|
|
|
});
|
|
|
|