{"record":{"id":"37715836735570cf","repo":"OpenBB-finance/OpenBB","slug":"e-377158","errorCode":null,"errorMessage":"{e}","messagePattern":"\\{e\\}","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/intrinio/openbb_intrinio/models/forward_pe_estimates.py","lineNumber":94,"sourceCode":"        import asyncio  # noqa\n        from openbb_core.provider.utils.errors import EmptyDataError, UnauthorizedError\n        from openbb_core.provider.utils.helpers import amake_request\n        from openbb_intrinio.utils.helpers import response_callback\n\n        api_key = credentials.get(\"intrinio_api_key\") if credentials else \"\"\n        BASE_URL = \"https://api-v2.intrinio.com/zacks/forward_pe\"\n        symbols = query.symbol.split(\",\") if query.symbol else None\n        results: list[dict] = []\n\n        async def get_one(symbol):\n            \"\"\"Get the data for one symbol.\"\"\"\n            url = f\"{BASE_URL}/{symbol}?api_key={api_key}\"\n            try:\n                data = await amake_request(\n                    url, response_callback=response_callback, **kwargs\n                )\n            except Exception as e:\n                raise OpenBBError(e) from e\n\n            if data:\n                results.append(data)  # type: ignore\n\n        if symbols:\n            try:\n                gather_results = await asyncio.gather(\n                    *[get_one(symbol) for symbol in symbols], return_exceptions=True\n                )\n\n                for result in gather_results:\n                    if isinstance(result, UnauthorizedError):\n                        raise result\n                    if isinstance(result, OpenBBError):\n                        raise result\n\n                if not results:\n                    raise EmptyDataError(","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/intrinio/openbb_intrinio/models/forward_pe_estimates.py#L76-L112","documentation":"OpenBBError wrapping any exception raised while fetching forward P/E data for a single symbol inside get_one(). The amake_request call (or its response_callback) threw something other than a pass-through OpenBBError, and this handler re-raises it as OpenBBError with the original as cause, so per-symbol network/parse failures are not silently dropped when symbols are requested individually.","triggerScenarios":"equity/estimates/forward_pe with provider=intrinio where amake_request for 'https://api-v2.intrinio.com/zacks/forward_pe/{symbol}' raises a network timeout, connection reset, JSON decode error, or unexpected status; also raised from the per-symbol path when the callback itself throws.","commonSituations":"Transient network failures or DNS issues; Intrinio returning non-JSON (HTML error page) for a bad symbol; proxies/firewalls intercepting the request; one bad ticker in a comma-separated batch.","solutions":["Inspect the wrapped exception text (it embeds the underlying error) to identify network vs parse failure.","Retry the single failing symbol after a short delay for transient network errors.","Verify the symbol with a direct curl to the same URL including your api_key.","Split large symbol batches to isolate the failing ticker."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"import socket\nsocket.gethostbyname('api-v2.intrinio.com')  # fail fast on DNS problems before the call","typeGuard":null,"tryCatchPattern":"from openbb_core.provider.exceptions import OpenBBError\nimport time\nfor attempt in range(3):\n    try:\n        res = obb.equity.estimates.forward_pe(symbol=sym, provider='intrinio')\n        break\n    except OpenBBError as e:\n        if attempt == 2 or 'empty' in str(e).lower():\n            raise\n        time.sleep(2 ** attempt)","preventionTips":["Use bounded retries with exponential backoff for transient network errors","Check the __cause__ text to distinguish network vs API errors","Split batches so one ticker's failure is isolated"],"tags":["intrinio","network","wrapper","estimates"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}