{"record":{"id":"ab7e2b398fe43951","repo":"OpenBB-finance/OpenBB","slug":"no-data-found-ab7e2b","errorCode":null,"errorMessage":"No data found.","messagePattern":"No data found\\.","errorType":"exception","errorClass":"EmptyDataError","httpStatus":null,"severity":"warning","filePath":"openbb_platform/providers/intrinio/openbb_intrinio/models/etf_search.py","lineNumber":133,"sourceCode":"                    if \"etfs\" in results and len(results.get(\"etfs\")) > 0:  # type: ignore\n                        data.extend(results.get(\"etfs\"))  # type: ignore\n            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: IntrinioEtfSearchQueryParams,\n        data: list[dict],\n        **kwargs: Any,\n    ) -> list[IntrinioEtfSearchData]:\n        \"\"\"Transform data.\"\"\"\n        # pylint: disable=import-outside-toplevel\n        import re  # noqa\n        from pandas import DataFrame  # noqa\n\n        if not data:\n            raise EmptyDataError(\"No data found.\")\n\n        results = DataFrame(data)\n        if query.query:\n            pattern = f\".*{re.escape(query.query)}.*\"\n            results = results[\n                results[\"name\"].str.contains(pattern, case=False, regex=True)\n            ]\n\n        return [\n            IntrinioEtfSearchData.model_validate(d)\n            for d in results.to_dict(orient=\"records\")\n        ]\n","sourceCodeStart":115,"sourceCodeEnd":146,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/intrinio/openbb_intrinio/models/etf_search.py#L115-L146","documentation":"EmptyDataError raised in IntrinioEtfSearchFetcher.transform_data when the fetched data list is empty before DataFrame conversion. This fires when the fetcher returned nothing at all — distinct from the post-filter case, since the regex name filter is applied after this check.","triggerScenarios":"ETF search where Intrinio returns no 'etfs' array (or an empty one) for the request: searches with zero hits, or responses where only a 'messages' key was present but empty enough not to raise error 672. Also raised when the fallback unfiltered call returned nothing.","commonSituations":"Searching obscure terms with no ETF matches; regional/language-specific queries; API returning empty results during degraded service.","solutions":["Broaden the search term (e.g. 'tech' instead of 'semiconductor leverage')","Search by issuer or well-known fund names; drop the query parameter to list ETFs","Catch EmptyDataError and show 'no ETFs matched' in the UI rather than an error"],"exampleFix":"# before\nres = obb.etf.search(provider=\"intrinio\", query=\"quantum computing leverage\")\n\n# after\nres = obb.etf.search(provider=\"intrinio\", query=\"quantum\")","handlingStrategy":"try-catch","validationCode":"def query_broad_enough(q: str, min_len: int = 3) -> bool:\n    return len((q or \"\").strip()) >= min_len","typeGuard":"from openbb_core.provider.utils.errors import EmptyDataError","tryCatchPattern":"from openbb_core.provider.utils.errors import EmptyDataError\n\ntry:\n    res = await obb.etf.search(provider=\"intrinio\", query=q)\nexcept EmptyDataError:\n    res = await obb.etf.search(provider=\"intrinio\", query=q[:4])  # broaden term","preventionTips":["Start broad and narrow client-side instead of starting narrow","Catch EmptyDataError as 'no matches' UX, not an exception","Prefer issuer names or short keywords"],"tags":["etf","search","intrinio","empty-data","no-results"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}