Logging improvements

This commit is contained in:
Ian Renton
2026-07-26 07:51:25 +01:00
parent c3bcc1190d
commit 77d7fd70d9
17 changed files with 48 additions and 48 deletions
+3 -3
View File
@@ -2,7 +2,7 @@ import logging
from datetime import datetime
import requests
from requests.exceptions import ConnectionError, ReadTimeout
from requests.exceptions import ConnectionError, ReadTimeout, ConnectTimeout
from core.constants import HTTP_HEADERS
from data.sig_ref import SIGRef
@@ -60,6 +60,6 @@ class SOTA(HTTPSpotProvider):
new_spots.append(spot)
except ConnectionError:
logging.warning("Connection error when accessing SOTA spots API")
except ReadTimeout:
logging.warning(f"Read timeout when accessing SOTA spots API.")
except (ConnectTimeout, ReadTimeout):
logging.warning(f"Timeout when accessing SOTA spots API.")
return new_spots