mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-12 03:48:33 +00:00
fix: creating a model in Manage Ollama shows no error when Ollama rejects it (#32196)
When Ollama rejected a new model in the Manage Ollama dialog, for example a model definition with no base model, the form cleared and showed no error, so the admin could not tell the model was never created or why. The dialog now shows Ollama's error and keeps the entered name and definition, so the admin can correct them and try again. Fixes #32002
This commit is contained in:
parent
aaea99005d
commit
eebf6438ab
1 changed files with 7 additions and 0 deletions
|
|
@ -454,6 +454,13 @@
|
|||
return null;
|
||||
});
|
||||
|
||||
if (res && !res.ok) {
|
||||
createModelLoading = false;
|
||||
const error = await res.json();
|
||||
toast.error(error.detail);
|
||||
return;
|
||||
}
|
||||
|
||||
if (res && res.ok) {
|
||||
const reader = res.body
|
||||
.pipeThrough(new TextDecoderStream())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue