Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugFix] Raise on "Error Message" with FMP Econ Calendar #6534

Merged
merged 2 commits into from
Jun 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from typing import Any, Dict, List, Optional
from warnings import warn

from openbb_core.app.model.abstract.error import OpenBBError
from openbb_core.provider.abstract.fetcher import Fetcher
from openbb_core.provider.standard_models.economic_calendar import (
EconomicCalendarData,
Expand Down Expand Up @@ -124,6 +125,8 @@ async def get_one(url):
try:
result = await amake_request(url, **kwargs)
if result:
if "Error Message" in result:
raise OpenBBError(result["Error Message"])
results.extend(result)
except Exception as e:
if len(urls) == 1 or (len(urls) > 1 and n_urls == len(urls)):
Expand Down
Loading