OpenBB-finance/OpenBB · error · OpenBBError

Error: {error} -> {message}

Error message

Error: {error} -> {message}

What it means

Generic OpenBBError from the forward P/E fetch callback for any Intrinio body-level error that is not an auth/entitlement failure (message lacks 'api key' and error lacks 'view this data'). It forwards the raw error code and message, e.g. 'Error: 404 Not Found -> ' for an unknown symbol on the all-symbols bulk URL.

Source

Thrown at openbb_platform/providers/intrinio/openbb_intrinio/models/forward_pe_estimates.py:132

                    )
                return results
            except Exception as e:
                raise OpenBBError(
                    f"Error in Intrinio request -> {e} -> {symbols}"
                ) from e

        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() or "view this data" in error.lower():
                    raise UnauthorizedError(
                        f"Unauthorized Intrinio request -> {message} -> {error}"
                    )
                raise OpenBBError(f"Error: {error} -> {message}")

            forward_pe = data.get("forward_pe")

            if forward_pe and len(forward_pe) > 0:  # type: ignore
                results.extend(forward_pe)  # type: ignore

            return results

        url = f"{BASE_URL}?page_size=10000&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

    @staticmethod
    def transform_data(

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Read the embedded error/message pair - it is Intrinio's verbatim response.
  2. If it indicates throttling, back off and retry with fewer symbols per minute.
  3. Verify the endpoint contract on Intrinio's docs if the error suggests a parameter problem.
  4. Update the openbb-intrinio provider package in case the URL/query format changed.
Defensive patterns

Strategy: try-catch

Try / catch

from openbb_core.provider.exceptions import OpenBBError
try:
    res = obb.equity.estimates.forward_pe(symbol=sym, provider='intrinio')
except OpenBBError as e:
    if 'limit' in str(e).lower() or '429' in str(e):
        time.sleep(60); retry()
    else:
        raise

Prevention

When it happens

Trigger: The no-symbol bulk call 'https://api-v2.intrinio.com/zacks/forward_pe?page_size=10000&api_key=...' (or a per-symbol variant) returning a JSON error body: invalid parameter, bad request shape, rate-limit message in the body, or endpoint change.

Common situations: Hitting Intrinio rate limits expressed as body errors; Intrinio API version changes altering the endpoint contract; malformed query construction after library upgrades.

Related errors


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