OpenBB-finance/OpenBB · error · OpenBBError

Error: {error} -> {message}

Error message

Error: {error} -> {message}

What it means

Generic OpenBBError in the same fetch_callback: the response contained an 'error' key but the message did not mention 'api key'. The message embeds both the Intrinio error code and message ('Error: <error> -> <message>') for diagnosis.

Source

Thrown at openbb_platform/providers/intrinio/openbb_intrinio/models/forward_ebitda_estimates.py:143

                results.extend(consensus)

        if symbols:
            await asyncio.gather(*[get_one(symbol) for symbol in symbols])
            if not results:
                raise EmptyDataError(f"No results were found. -> {query.symbol}")
            return results

        async def fetch_callback(response, session):
            """Use callback for pagination."""
            data = await response.json()
            error = data.get("error", None)
            if error:
                message = data.get("message", "")
                if "api key" in message.lower():
                    raise UnauthorizedError(
                        f"Unauthorized Intrinio request -> {message}"
                    )
                raise OpenBBError(f"Error: {error} -> {message}")

            estimates = data.get("ebitda_consensus", [])  # type: ignore
            if estimates and len(estimates) > 0:
                results.extend(estimates)
                while data.get("next_page"):  # type: ignore
                    next_page = data["next_page"]  # type: ignore
                    next_url = f"{url}&next_page={next_page}"
                    data = await amake_request(next_url, session=session, **kwargs)
                    consensus = (
                        data.get("ebitda_consensus")
                        if isinstance(data, dict) and "ebitda_consensus" in data
                        else []
                    )
                    if consensus:
                        results.extend(consensus)  # type: ignore
            return results

        url = f"{BASE_URL}&{query_str}" if query_str else BASE_URL

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Read the embedded '<error> -> <message>' pair; it is Intrinio's verbatim reason
  2. Simplify the query (drop optional filters) to isolate which parameter the API rejects
  3. If the text hints at access/limits, verify plan and key — auth issues sometimes bypass the 'api key' wording
  4. Retry once after a short delay in case of transient upstream errors
Defensive patterns

Strategy: retry

Type guard

from openbb_core.provider.abstract.error import OpenBBError

def is_estimates_request_error(err: BaseException) -> bool:
    return isinstance(err, OpenBBError) and str(err).startswith("Error:")

Try / catch

from openbb_core.provider.abstract.error import OpenBBError

for attempt in range(2):
    try:
        res = await obb.equity.estimates.ebitda(provider="intrinio")
        break
    except OpenBBError as e:
        if str(e).startswith("Error:") and attempt == 0:
            continue  # one retry for transient upstream errors
        raise

Prevention

When it happens

Trigger: Bulk forward-EBITDA consensus request failing for non-auth reasons: malformed query string parameters (bad dates/page sizing), endpoint temporarily unavailable, plan restrictions worded without 'api key', or deprecated parameter names.

Common situations: Passing unsupported filter values to the estimates endpoint; upstream API changes; rate limiting expressed as a generic error payload.

Related errors


AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14). Data as JSON: /api/errors/7c5a0eed0165782e. Report an issue: GitHub.