Better general/fallback error message and traceback for unknown config errors (#44655)

* Include error repr in config error message is str(error) yields nothing

* Log traceback for config errors we don't have a "friendly" formatter for
This commit is contained in:
Ville Skyttä
2021-01-05 13:55:38 +01:00
committed by GitHub
parent 853420d972
commit 67eebce55a
2 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -78,7 +78,7 @@ async def async_check_ha_config_file(hass: HomeAssistant) -> HomeAssistantConfig
def _comp_error(ex: Exception, domain: str, config: ConfigType) -> None:
"""Handle errors from components: async_log_exception."""
result.add_error(_format_config_error(ex, domain, config), domain, config)
result.add_error(_format_config_error(ex, domain, config)[0], domain, config)
# Load configuration.yaml
config_path = hass.config.path(YAML_CONFIG_FILE)