mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Broader Notion exception handling (#35265)
This commit is contained in:
parent
9983c43697
commit
87d58a544b
@ -196,7 +196,14 @@ class Notion:
|
|||||||
results = await asyncio.gather(*tasks.values(), return_exceptions=True)
|
results = await asyncio.gather(*tasks.values(), return_exceptions=True)
|
||||||
for attr, result in zip(tasks, results):
|
for attr, result in zip(tasks, results):
|
||||||
if isinstance(result, NotionError):
|
if isinstance(result, NotionError):
|
||||||
_LOGGER.error("There was an error while updating %s: %s", attr, result)
|
_LOGGER.error(
|
||||||
|
"There was a Notion error while updating %s: %s", attr, result
|
||||||
|
)
|
||||||
|
continue
|
||||||
|
if isinstance(result, Exception):
|
||||||
|
_LOGGER.error(
|
||||||
|
"There was an unknown error while updating %s: %s", attr, result
|
||||||
|
)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
holding_pen = getattr(self, attr)
|
holding_pen = getattr(self, attr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user