· 5 years ago · May 27, 2020, 04:32 PM
1from ..base_dir.base import log
2
3
4class APIError(Exception):
5 pass
6
7
8class NotKnownQuery(APIError):
9 def __init__(self):
10 super().__init__("The name of the query is not known, sorry")
11 log.error("The name of the query is not known, sorry")
12
13
14class InvalidKey(APIError):
15 def __init__(self):
16 super().__init__("They key for API is not valid")
17 log.error("They key for API is not valid")
18
19
20class InvalidRecipeApiKey(InvalidKey):
21 def __init__(self):
22 super().__init__()
23 log.error("Specifically, the recipe API key is not valid")