mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-22 00:36:34 +00:00
Display service call error message (#2874)
This commit is contained in:
parent
9383d80354
commit
34c6356a47
@ -71,14 +71,16 @@ export default (superClass) =>
|
|||||||
"Error calling service",
|
"Error calling service",
|
||||||
domain,
|
domain,
|
||||||
service,
|
service,
|
||||||
serviceData
|
serviceData,
|
||||||
|
err
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const message = this.hass.localize(
|
const message =
|
||||||
"ui.notification_toast.service_call_failed",
|
this.hass.localize(
|
||||||
"service",
|
"ui.notification_toast.service_call_failed",
|
||||||
`${domain}/${service}`
|
"service",
|
||||||
);
|
`${domain}/${service}`
|
||||||
|
) + ` ${err.message}`;
|
||||||
this.fire("hass-notification", { message });
|
this.fire("hass-notification", { message });
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user