forked from open-webui/open-webui
refac: error message
This commit is contained in:
parent
f04d60b6d9
commit
8fd7bc342d
3 changed files with 12 additions and 7 deletions
|
@ -20,7 +20,10 @@
|
|||
const deleteModelHandler = async (tagName) => {
|
||||
let success = null;
|
||||
|
||||
success = await deleteModel(localStorage.token, tagName);
|
||||
success = await deleteModel(localStorage.token, tagName).catch((err) => {
|
||||
toast.error(err);
|
||||
return null;
|
||||
});
|
||||
|
||||
if (success) {
|
||||
toast.success(`Deleted ${tagName}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue