{"record":{"id":"73dc14360d1cef64","repo":"OpenBB-finance/OpenBB","slug":"error-in-intrinio-request-e-symbols","errorCode":null,"errorMessage":"Error in Intrinio request -> {e} -> {symbols}","messagePattern":"Error in Intrinio request -> (.+?) -> (.+?)","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/intrinio/openbb_intrinio/models/forward_pe_estimates.py","lineNumber":117,"sourceCode":"        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(\n                        f\"There were no results found for any of the given symbols. -> {symbols}\"\n                    )\n                return results\n            except Exception as e:\n                raise OpenBBError(\n                    f\"Error in Intrinio request -> {e} -> {symbols}\"\n                ) from e\n\n        async def fetch_callback(response, session):\n            \"\"\"Use callback for pagination.\"\"\"\n            data = await response.json()\n            error = data.get(\"error\", None)\n\n            if error:\n                message = data.get(\"message\", \"\")\n                if \"api key\" in message.lower() or \"view this data\" in error.lower():\n                    raise UnauthorizedError(\n                        f\"Unauthorized Intrinio request -> {message} -> {error}\"\n                    )\n                raise OpenBBError(f\"Error: {error} -> {message}\")\n\n            forward_pe = data.get(\"forward_pe\")\n","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/intrinio/openbb_intrinio/models/forward_pe_estimates.py#L99-L135","documentation":"Catch-all OpenBBError around the per-symbol forward P/E branch. After gather with return_exceptions=True, any non-Unauthorized/non-OpenBB exception re-raised during result inspection, or the EmptyDataError itself, gets re-wrapped with the failing symbol list. Note the except Exception clause also swallows the clearer EmptyDataError from the same try block, double-wrapping it as 'Error in Intrinio request -> ... empty ... -> symbols'.","triggerScenarios":"Any exception escaping the per-symbol gather loop of equity/estimates/forward_pe with provider=intrinio: an unexpected exception type in gather_results (e.g. TimeoutError, JSONDecodeError), or the EmptyDataError raised when no symbol yielded data being caught here and re-wrapped.","commonSituations":"Timeouts on multi-symbol batches; the misleading double-wrapped message making an empty-result case look like a request failure; code updates to exception types not covered by the isinstance checks.","solutions":["Parse the innermost exception text after the first '->' to find the true cause.","If the inner message is about empty results, treat it as a coverage problem (see error 685), not a request error.","For timeouts, reduce the symbol batch size or increase timeout kwargs.","Report the over-broad except as a library issue - EmptyDataError should propagate unwrapped."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"from openbb_core.provider.exceptions import OpenBBError\ntry:\n    res = obb.equity.estimates.forward_pe(symbol=syms, provider='intrinio')\nexcept OpenBBError as e:\n    inner = str(e).split('->')[-2] if '->' in str(e) else str(e)\n    if 'empty' in inner.lower() or 'no results' in inner.lower():\n        handle_no_coverage(syms)\n    else:\n        raise","preventionTips":["Unwrap the chained '->' segments to find the root cause","Remember EmptyDataError gets double-wrapped here - innermost text wins","Reduce batch size on timeouts","Report over-wrapping as a library issue"],"tags":["intrinio","wrapper","estimates","error-masking"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}