Make AlphaVantage premium endpoint rejection message check more robust.

This commit is contained in:
Chris Berkhout 2023-08-26 10:57:40 +02:00
parent ffeebe5ffa
commit 06c2876152

View file

@ -341,7 +341,8 @@ class AlphaVantage(BaseSource):
raise exceptions.RateLimit(data["Note"])
if (
"Information" in data
and "ways to unlock premium" in data["Information"]
and "unlock" in data["Information"]
and "premium" in data["Information"]
):
msg = "You were denied access to a premium endpoint."
raise exceptions.CredentialsError([self.API_KEY_NAME], self, msg)