diff --git a/lametro/models.py b/lametro/models.py index a3833731..5e169b79 100644 --- a/lametro/models.py +++ b/lametro/models.py @@ -75,6 +75,10 @@ def api_representation(self): ) return None + except requests.ConnectionError: + logger.warning(f"Request to {self.api_source.url} disconnected.") + return None + return response.json()