mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +00:00
Handle processing errors when writing to Zabbix (#148449)
This commit is contained in:
parent
6b5b35fece
commit
afcd991262
@ -13,7 +13,7 @@ from urllib.parse import urljoin
|
||||
|
||||
import voluptuous as vol
|
||||
from zabbix_utils import ItemValue, Sender, ZabbixAPI
|
||||
from zabbix_utils.exceptions import APIRequestError
|
||||
from zabbix_utils.exceptions import APIRequestError, ProcessingError
|
||||
|
||||
from homeassistant.const import (
|
||||
CONF_HOST,
|
||||
@ -282,6 +282,8 @@ class ZabbixThread(threading.Thread):
|
||||
if not self.write_errors:
|
||||
_LOGGER.error("Write error: %s", err)
|
||||
self.write_errors += len(metrics)
|
||||
except ProcessingError as prerr:
|
||||
_LOGGER.error("Error writing to Zabbix: %s", prerr)
|
||||
|
||||
def run(self) -> None:
|
||||
"""Process incoming events."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user