matrix-alertbot/matrix_alertbot/errors.py
2022-07-09 10:38:40 +02:00

31 lines
674 B
Python

# This file holds custom error types that you can define for your application.
class ConfigError(Exception):
"""An error encountered during reading the config file."""
pass
class AlertmanagerError(Exception):
"""An error encountered with Alertmanager."""
pass
class AlertNotFoundError(AlertmanagerError):
"""An error encountered when an alert cannot be found in Alertmanager."""
pass
class SilenceNotFoundError(AlertmanagerError):
"""An error encountered when a silence cannot be found in Alertmanager."""
pass
class AlertmanagerServerError(AlertmanagerError):
"""An error encountered with Alertmanager server."""
pass