mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 17:26:42 +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) {
|
} catch (err: any) {
|
||||||
this.closeDialog();
|
this.closeDialog();
|
||||||
|
let message = err.message || err.body || "Unknown error";
|
||||||
|
if (typeof message !== "string") {
|
||||||
|
message = JSON.stringify(message);
|
||||||
|
}
|
||||||
showAlertDialog(this, {
|
showAlertDialog(this, {
|
||||||
title: this.hass.localize(
|
title: this.hass.localize(
|
||||||
"ui.panel.config.integrations.config_flow.error"
|
"ui.panel.config.integrations.config_flow.error"
|
||||||
),
|
),
|
||||||
text: `${this.hass.localize(
|
text: `${this.hass.localize(
|
||||||
"ui.panel.config.integrations.config_flow.could_not_load"
|
"ui.panel.config.integrations.config_flow.could_not_load"
|
||||||
)}: ${err.message || err.body}`,
|
)}: ${message}`,
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user