mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 01:06:35 +00:00
Convert objects to string in config flow error (#11908)
This commit is contained in:
parent
24829bd903
commit
797c871137
@ -117,13 +117,17 @@ class DataEntryFlowDialog extends LitElement {
|
||||
);
|
||||
} catch (err: any) {
|
||||
this.closeDialog();
|
||||
let message = err.message || err.body || "Unknown error";
|
||||
if (typeof message !== "string") {
|
||||
message = JSON.stringify(message);
|
||||
}
|
||||
showAlertDialog(this, {
|
||||
title: this.hass.localize(
|
||||
"ui.panel.config.integrations.config_flow.error"
|
||||
),
|
||||
text: `${this.hass.localize(
|
||||
"ui.panel.config.integrations.config_flow.could_not_load"
|
||||
)}: ${err.message || err.body}`,
|
||||
)}: ${message}`,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user