mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-25 05:46:13 +00:00
refactor: standardize error handling across components by utilizing CustomApiError for improved error messaging
This commit is contained in:
@@ -291,7 +291,7 @@ export default function ExternalKBForm({
|
||||
toast.success(t('knowledge.updateExternalSuccess'));
|
||||
})
|
||||
.catch((err) => {
|
||||
toast.error('Failed to update KB: ' + err.message);
|
||||
toast.error('Failed to update KB: ' + err.msg);
|
||||
});
|
||||
} else {
|
||||
// Create new KB
|
||||
@@ -303,7 +303,7 @@ export default function ExternalKBForm({
|
||||
form.reset();
|
||||
})
|
||||
.catch((err) => {
|
||||
toast.error('Failed to create KB: ' + err.message);
|
||||
toast.error('Failed to create KB: ' + err.msg);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -321,7 +321,7 @@ export default function ExternalKBForm({
|
||||
toast.success(t('knowledge.deleteExternalSuccess'));
|
||||
})
|
||||
.catch((err) => {
|
||||
toast.error('Failed to delete KB: ' + err.message);
|
||||
toast.error('Failed to delete KB: ' + err.msg);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user