Include filename in exception when loading a json file fails (#111802)

* Include filename in exception when loading a json file fails

* fix
This commit is contained in:
J. Nick Koston 2024-02-29 05:30:29 -10:00 committed by GitHub
parent 9512fb420d
commit f59268b2ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 10 deletions

View file

@ -706,8 +706,8 @@ async def test_loading_corrupt_core_file(
assert issue_entry.translation_placeholders["storage_key"] == storage_key
assert issue_entry.issue_domain == HOMEASSISTANT_DOMAIN
assert (
issue_entry.translation_placeholders["error"]
== "unexpected character: line 1 column 1 (char 0)"
"unexpected character: line 1 column 1 (char 0)"
in issue_entry.translation_placeholders["error"]
)
files = await hass.async_add_executor_job(
@ -767,8 +767,8 @@ async def test_loading_corrupt_file_known_domain(
assert issue_entry.translation_placeholders["storage_key"] == storage_key
assert issue_entry.issue_domain == "testdomain"
assert (
issue_entry.translation_placeholders["error"]
== "unexpected content after document: line 1 column 17 (char 16)"
"unexpected content after document: line 1 column 17 (char 16)"
in issue_entry.translation_placeholders["error"]
)
files = await hass.async_add_executor_job(