Skip to content

Commit

Permalink
Update init to raise on missing API key to match other services
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Dec 27, 2023
1 parent 92d6441 commit 9c34771
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions neon_api_proxy/services/map_maker_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ class MapMakerAPI(CachedAPI):
def __init__(self, api_key: str = None, cache_seconds=604800): # Cache week
super().__init__("map_maker")
self._api_key = api_key or getenv("MAP_MAKER_KEY")
if self._api_key is None:
raise RuntimeError(f"No API key provided for Map Maker")
self._rate_limit_seconds = 1
self._last_query = time()
self.cache_timeout = timedelta(seconds=cache_seconds)
Expand Down

0 comments on commit 9c34771

Please sign in to comment.