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
|
|
|
|
2022-07-04 01:03:24 +02:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
2022-07-09 12:22:05 +02:00
|
|
|
class ParseConfigError(ConfigError):
|
|
|
|
"""An error encountered when config file cannot be parsed."""
|
|
|
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class InvalidConfigError(ParseConfigError):
|
|
|
|
"""An error encountered when a config key is not valid."""
|
|
|
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class RequiredConfigKeyError(ConfigError):
|
|
|
|
"""An error encountered when a required config key is missing."""
|
|
|
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2022-07-09 10:38:40 +02:00
|
|
|
class AlertmanagerError(Exception):
|
|
|
|
"""An error encountered with Alertmanager."""
|
|
|
|
|
|
|
|
pass
|
|
|
|
|
2022-07-04 01:03:24 +02:00
|
|
|
|
2022-07-09 10:38:40 +02:00
|
|
|
class AlertNotFoundError(AlertmanagerError):
|
|
|
|
"""An error encountered when an alert cannot be found in Alertmanager."""
|
2022-07-04 01:03:24 +02:00
|
|
|
|
|
|
|
pass
|
2022-07-06 00:54:13 +02:00
|
|
|
|
|
|
|
|
2022-07-10 02:40:04 +02:00
|
|
|
class AlertMismatchError(AlertmanagerError):
|
|
|
|
"""An error encountered when alert's labels don't match."""
|
|
|
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
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
|