Update helpers.py

This commit is contained in:
tehcoderer
2023-11-27 14:20:35 -05:00
parent e8a3589646
commit 4a4f43f80b

View File

@@ -58,6 +58,8 @@ def get_data(url: str, **kwargs: Any) -> Union[list, dict]:
r: Union[requests.Response, BasicResponse] = helpers.make_request(url, **kwargs)
except SSLError:
r = request(url)
if r.status_code == 404:
raise RuntimeError("Alpha Vantage endpoint doesn't exist")
data = r.json()
if "Information" in data: