OpenBB-finance/OpenBB · error · OpenBBError
There was an error with the HTTP request
Error message
There was an error with the HTTP request
What it means
EconDbPortVolumeFetcher.aextract_data wraps any exception from amake_request of the static asset https://www.econdb.com/static/openbb/shipping.json into OpenBBError('There was an error with the HTTP request'). The blanket except means any transport failure — DNS, timeout, TLS, connection reset, 5xx mapped to an exception — surfaces as this message.
Source
Thrown at openbb_platform/providers/econdb/openbb_econdb/models/port_volume.py:86
"""Transform the query."""
return EconDbPortVolumeQueryParams(**params)
@staticmethod
async def aextract_data(
query: EconDbPortVolumeQueryParams,
credentials: dict[str, str] | None,
**kwargs: Any,
) -> dict:
"""Extract the raw data."""
# pylint: disable=import-outside-toplevel
from openbb_core.provider.utils.helpers import amake_request
url = "https://www.econdb.com/static/openbb/shipping.json"
try:
response = await amake_request(url)
except Exception as e:
raise OpenBBError("There was an error with the HTTP request") from e
if isinstance(response, dict):
return response
raise OpenBBError(
f"Unexpected format of the response. -> Expected dict, got {str(response.__class__.__name__)}"
)
@staticmethod
def transform_data(
query: EconDbPortVolumeQueryParams,
data: dict,
**kwargs: Any,
) -> list[EconDbPortVolumeData]:
"""Transform the data."""
# pylint: disable=import-outside-toplevel
from openbb_econdb.utils.helpers import COUNTRY_MAP
from pandas import DataFrame, concat, to_datetime
View on GitHub (pinned to 3e071fcc2c)
Solutions
- Verify connectivity: curl -I https://www.econdb.com/static/openbb/shipping.json.
- Retry — transient timeouts and resets are the most common cause.
- Configure proxy environment variables (HTTP_PROXY/HTTPS_PROXY) if behind a corporate proxy.
- If the URL now 404s or the host is down, wait for EconDB to restore it; there is no parameter change that fixes a transport failure.
Defensive patterns
Strategy: retry
Validate before calling
import socket, httpx
assert socket.gethostbyname('www.econdb.com'), 'DNS resolves'
# optional connectivity probe
# httpx.head('https://www.econdb.com/static/openbb/shipping.json', timeout=5) Try / catch
from openbb_core.app.model.obbject import OpenBBError
import asyncio
for attempt in range(3):
try:
res = obb.economy.port_volume(provider='econdb')
break
except OpenBBError as e:
if 'HTTP request' in str(e) and attempt < 2:
await asyncio.sleep(2 ** attempt)
continue
raise Prevention
- Probe econdb.com reachability in environment health checks.
- Configure proxy env vars for restricted networks.
- Use exponential-backoff retry for transient transport errors.
When it happens
Trigger: Any economy.port_volume(provider='econdb') call while the client cannot fetch shipping.json: no internet, firewall/proxy blocking econdb.com, read timeout, or the server dropping the connection.
Common situations: Offline/CI environments without network access; corporate proxies; transient EconDB downtime; egress-restricted containers.
Related errors
- Method must be GET or POST
- e
- Dates must be after 2022-04-03.
- Unexpected format of the response. -> Expected dict, got {st
- The request was returned empty.
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/f645bb51d9b9d09c.
Report an issue: GitHub.