mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-31 13:07:49 +00:00
Ensure we always show backend error in automation and script editor (#8139)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
parent
95fd8de1bc
commit
6919d0cde6
@ -503,9 +503,9 @@ export class HaAutomationEditor extends KeyboardShortcutMixin(LitElement) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
(errors) => {
|
(errors) => {
|
||||||
this._errors = errors.body.message;
|
this._errors = errors.body.message || errors.error || errors.body;
|
||||||
showToast(this, {
|
showToast(this, {
|
||||||
message: errors.body.message,
|
message: errors.body.message || errors.error || errors.body,
|
||||||
});
|
});
|
||||||
throw errors;
|
throw errors;
|
||||||
}
|
}
|
||||||
|
@ -660,9 +660,9 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
(errors) => {
|
(errors) => {
|
||||||
this._errors = errors.body.message;
|
this._errors = errors.body.message || errors.error || errors.body;
|
||||||
showToast(this, {
|
showToast(this, {
|
||||||
message: errors.body.message,
|
message: errors.body.message || errors.error || errors.body,
|
||||||
});
|
});
|
||||||
throw errors;
|
throw errors;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user