{"record":{"id":"d71183fddef4c467","repo":"OpenBB-finance/OpenBB","slug":"data-get-message-query-symbol-data-error","errorCode":null,"errorMessage":"{data.get('message')} {query.symbol}: {data['error']}","messagePattern":"\\{data\\.get\\('message'\\)\\} \\{query\\.symbol\\}: \\{data\\['error'\\]\\}","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/intrinio/openbb_intrinio/models/etf_holdings.py","lineNumber":201,"sourceCode":"            return data\n\n        return await amake_request(URL, response_callback=response_callback, **kwargs)  # type: ignore\n\n    @staticmethod\n    def transform_data(\n        query: IntrinioEtfHoldingsQueryParams,\n        data: list[dict],\n        **kwargs: Any,\n    ) -> list[IntrinioEtfHoldingsData]:\n        \"\"\"Transform data.\"\"\"\n        if not data or isinstance(data, dict) and data.get(\"error\"):\n            if isinstance(data, list) and data == []:\n                raise OpenBBError(\n                    str(\n                        f\"No holdings were found for {query.symbol}, and the response from Intrinio was empty.\"\n                    )\n                )\n            raise OpenBBError(str(f\"{data.get('message')} {query.symbol}: {data['error']}\"))  # type: ignore\n\n        results: list[IntrinioEtfHoldingsData] = []\n        for d in sorted(data, key=lambda x: x[\"weighting\"], reverse=True):\n            # This field is deprecated and is dupilcated in the response.\n            _ = d.pop(\"composite_figi\", None)\n            if d.get(\"coupon\"):\n                d[\"coupon\"] = d[\"coupon\"] / 100\n            results.append(IntrinioEtfHoldingsData.model_validate(d))\n\n        return results\n","sourceCodeStart":183,"sourceCodeEnd":212,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/intrinio/openbb_intrinio/models/etf_holdings.py#L183-L212","documentation":"The companion branch of etf_holdings transform_data: the response is a dict containing an 'error' key (not a list), so the fetcher surfaces Intrinio's own message and error for the requested symbol. Format: '<message> <symbol>: <error>'.","triggerScenarios":"The Intrinio ETF holdings endpoint returns an error object for the given symbol: unknown/invalid ticker, ticker that is not an ETF, or API/plan-level errors. Because the payload is a dict, the empty-list branch is skipped and this error-in-response branch fires.","commonSituations":"Typos or delisted tickers; passing common stocks where an ETF is expected; plan restrictions on the holdings endpoint; symbol formatting Intrinio rejects (e.g. dots or suffixed share classes).","solutions":["Read the embedded Intrinio message/error pair — it names the exact upstream reason","Validate the ticker is a known ETF via obb.etf.search(provider='intrinio') before requesting holdings","Normalize the symbol (strip suffixes like ':US' where not expected) and retry","Verify your Intrinio plan includes ETF holdings data"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"from openbb_core.provider.abstract.error import OpenBBError\n\ndef is_holdings_api_error(err: BaseException) -> bool:\n    msg = str(err)\n    return isinstance(err, OpenBBError) and not \"response from Intrinio was empty\" in msg","tryCatchPattern":"from openbb_core.provider.abstract.error import OpenBBError\n\ntry:\n    holdings = await obb.etf.holdings(provider=\"intrinio\", symbol=sym)\nexcept OpenBBError as e:\n    # message embeds Intrinio's <message> <symbol>: <error>\n    log.warning(\"intrinio holdings failed for %s: %s\", sym, e)\n    raise","preventionTips":["Verify ticker validity and ETF-ness before the call","Log the embedded upstream message — it names the exact cause","Check plan includes ETF holdings data"],"tags":["etf","holdings","intrinio","api-error","invalid-symbol"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}