OpenBB-finance/OpenBB · error · OpenBBError

Error: {error} -> {message}

Error message

Error: {error} -> {message}

What it means

Generic OpenBBError from the forward sales estimates callback for Intrinio body errors unrelated to API keys. Wraps the raw error and message fields so the caller sees exactly what Intrinio reported for the zacks/forward_sales request (including paginated next_page fetches, which reuse amake_request but surface errors here only on the first page).

Source

Thrown at openbb_platform/providers/intrinio/openbb_intrinio/models/forward_sales_estimates.py:192

                new_data = data.get("estimates")  # type: ignore
                if new_data:
                    results.extend(new_data)

        if symbols:
            await asyncio.gather(*[get_one(symbol) for symbol in symbols])
            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}")
            if data.get("estimates") and len(data.get("estimates")) > 0:  # type: ignore
                results.extend(data.get("estimates"))  # type: ignore
                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)
                    if "estimates" in data and len(data.get("estimates")) > 0:  # type: ignore
                        results.extend(data.get("estimates"))  # type: ignore
            return results

        url = f"{BASE_URL}&{query_str}&api_key={api_key}"

        results = await amake_request(url, response_callback=fetch_callback, **kwargs)  # type: ignore

        if not results:
            raise EmptyDataError("The request was successful but was returned empty.")

        return results

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Read the raw '{error} -> {message}' content to classify the failure.
  2. Fix symbol or parameter per the message.
  3. Add request spacing to avoid rate-limit errors.
  4. Update openbb-intrinio if the endpoint contract changed.
Defensive patterns

Strategy: try-catch

Validate before calling

import re
def is_ticker(s): return bool(re.fullmatch(r'[A-Z.\-]{1,8}', s.upper()))

Try / catch

from openbb_core.provider.exceptions import OpenBBError
try:
    res = obb.equity.estimates.forward_sales(symbol=sym, provider='intrinio')
except OpenBBError as e:
    log.warning('intrinio forward_sales failed for %s: %s', sym, e)
    raise

Prevention

When it happens

Trigger: equity/estimates/forward_sales with provider='intrinio' where the initial page returns a JSON error body: invalid symbol or parameter, rate limit expressed in body, or endpoint contract change.

Common situations: Misspelled/delisted tickers; throttling after bursts of estimate calls; Intrinio API schema changes after provider package updates lag.

Related errors


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