matrix-alertbot/matrix_alertbot/errors.py

32 lines
674 B
Python
Raw Normal View History

2021-01-10 04:30:07 +01:00
# This file holds custom error types that you can define for your application.
2022-07-09 10:38:40 +02:00
class ConfigError(Exception):
"""An error encountered during reading the config file."""
2020-08-10 00:02:07 +02:00
pass
2022-07-09 10:38:40 +02:00
class AlertmanagerError(Exception):
"""An error encountered with Alertmanager."""
pass
2022-07-09 10:38:40 +02:00
class AlertNotFoundError(AlertmanagerError):
"""An error encountered when an alert cannot be found in Alertmanager."""
pass
2022-07-06 00:54:13 +02:00
2022-07-09 10:38:40 +02:00
class SilenceNotFoundError(AlertmanagerError):
"""An error encountered when a silence cannot be found in Alertmanager."""
2022-07-06 00:54:13 +02:00
pass
2022-07-09 10:38:40 +02:00
class AlertmanagerServerError(AlertmanagerError):
"""An error encountered with Alertmanager server."""
2022-07-06 00:54:13 +02:00
pass