mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-11 20:05:19 +00:00
refac
This commit is contained in:
parent
97448e25ec
commit
8fd5006b6f
1 changed files with 5 additions and 1 deletions
|
|
@ -1785,13 +1785,17 @@
|
|||
).catch(async (error) => {
|
||||
console.log(error);
|
||||
|
||||
let errorMessage = $i18n.t(`Uh-oh! There was an issue with the response.`);
|
||||
let errorMessage = error;
|
||||
if (error?.error?.message) {
|
||||
errorMessage = error.error.message;
|
||||
} else if (error?.message) {
|
||||
errorMessage = error.message;
|
||||
}
|
||||
|
||||
if (typeof errorMessage === 'object') {
|
||||
errorMessage = $i18n.t(`Uh-oh! There was an issue with the response.`);
|
||||
}
|
||||
|
||||
toast.error(`${errorMessage}`);
|
||||
responseMessage.error = {
|
||||
content: error
|
||||
|
|
|
|||
Loading…
Reference in a new issue