mirror of
https://github.com/mtan93/cachet-url-monitor.git
synced 2026-03-08 05:31:58 +00:00
21 2 (#77)
* 21 - Improving exception when an invalid type is used in the config * Bumping the version
This commit is contained in:
@@ -329,6 +329,9 @@ class Expectation(object):
|
||||
'LATENCY': Latency,
|
||||
'REGEX': Regex
|
||||
}
|
||||
if configuration['type'] not in expectations:
|
||||
raise ConfigurationValidationError(f"Invalid type: {configuration['type']}")
|
||||
|
||||
return expectations.get(configuration['type'])(configuration)
|
||||
|
||||
def __init__(self, configuration):
|
||||
|
||||
Reference in New Issue
Block a user