diff --git a/agenda/fx.py b/agenda/fx.py index de70146..61c4bb7 100644 --- a/agenda/fx.py +++ b/agenda/fx.py @@ -96,8 +96,8 @@ def get_rates(config: flask.config.Config) -> dict[str, Decimal]: filename = f"{now_str}_{file_suffix}" try: with httpx.Client() as client: - response = client.get(url, params=params) - except httpx.ConnectError: + response = client.get(url, params=params, timeout=10) + except (httpx.ConnectError, httpx.ReadTimeout): return read_cached_rates(full_path, currencies) try: