Display service call error message (#2874)

This commit is contained in:
Jason Hu 2019-03-01 23:09:57 -08:00 committed by Paulus Schoutsen
parent 9383d80354
commit 34c6356a47

View File

@ -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;
} }