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
@@ -5,7 +5,7 @@ from threading import Thread, Event
import pytz
import requests
from requests import ReadTimeout
from requests.exceptions import ConnectionError
from requests.exceptions import ConnectionError, ConnectTimeout
from core.constants import HTTP_HEADERS
from spotproviders.spot_provider import SpotProvider
@@ -60,8 +60,8 @@ class HTTPSpotProvider(SpotProvider):
except ConnectionError:
logging.warning(f"Connection error when accessing {self.name} spots API.")
except ReadTimeout:
logging.warning(f"Read timeout when accessing {self.name} spots API.")
except (ConnectTimeout, ReadTimeout):
logging.warning(f"Timeout when accessing {self.name} spots API.")
except Exception:
self.status = "Error"
logging.exception("Exception in HTTP JSON Spot Provider (" + self.name + ")")