{"record":{"id":"c12b29b33b5e7c91","repo":"OpenBB-finance/OpenBB","slug":"error-the-request-was-returned-as-empty-try-adju","errorCode":null,"errorMessage":"Error: The request was returned as empty. Try adjusting the requested date ranges, if applicable.","messagePattern":"Error: The request was returned as empty\\. Try adjusting the requested date ranges, if applicable\\.","errorType":"exception","errorClass":"EmptyDataError","httpStatus":null,"severity":"warning","filePath":"openbb_platform/providers/intrinio/openbb_intrinio/models/company_news.py","lineNumber":272,"sourceCode":"            \"\"\"Get the data for one symbol.\"\"\"\n            url = f\"{base_url}/{symbol}/news?{query_str}&page_size={query.limit}&api_key={api_key}\"\n            data = await amake_request(url, response_callback=callback, **kwargs)\n            if not data:\n                warn(f\"No data found for: {symbol}\")\n            if data:\n                data = [x for x in data if not (x[\"url\"] in seen or seen.add(x[\"url\"]))]  # type: ignore\n                news.extend(\n                    sorted(data, key=lambda x: x[\"publication_date\"], reverse=True)[\n                        : query.limit\n                    ]\n                )\n\n        tasks = [get_one(symbol) for symbol in symbols]\n\n        await asyncio.gather(*tasks)\n\n        if not news:\n            raise EmptyDataError(\n                \"Error: The request was returned as empty.\"\n                + \" Try adjusting the requested date ranges, if applicable.\"\n            )\n\n        return news\n\n    # pylint: disable=unused-argument\n    @staticmethod\n    def transform_data(\n        query: IntrinioCompanyNewsQueryParams, data: list[dict], **kwargs: Any\n    ) -> list[IntrinioCompanyNewsData]:\n        \"\"\"Return the transformed data.\"\"\"\n        results: list[IntrinioCompanyNewsData] = []\n        for item in data:\n            body = item.get(\"body\", {})\n            if not body:\n                item[\"text\"] = item.pop(\"summary\")\n            if body:","sourceCodeStart":254,"sourceCodeEnd":290,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/intrinio/openbb_intrinio/models/company_news.py#L254-L290","documentation":"EmptyDataError raised at the end of IntrinioCompanyNewsFetcher.transform_query/aresults after all per-symbol tasks complete and the accumulated 'news' list is empty. It means every request succeeded (or warned) but zero articles survived the fetch and URL-dedup stage, so there is nothing to transform into CompanyNewsData rows.","triggerScenarios":"Requesting a valid but news-less symbol (small caps, new listings), a date window outside available coverage, a relevance score filter (business_relevance_of_news_x) that excludes everything, or a combination of symbols where each returns an empty 'news' array.","commonSituations":"Backfill pipelines scanning thousands of tickers where many legitimately have no articles; narrow start/end date windows; users assuming the API errors on no-data — instead OpenBB raises EmptyDataError so callers must treat empty as a normal outcome.","solutions":["Widen or clear start_date/end_date and retry","Confirm the symbol trades and has news coverage (check another provider, e.g. provider='benzinga' or 'fmp')","Relax the relevance-score filter parameters if set","Handle EmptyDataError as an expected empty result in batch jobs rather than a failure"],"exampleFix":"# before\nres = obb.news.company_news(provider=\"intrinio\", symbol=\"XYZ\", start_date=\"2020-01-01\", end_date=\"2020-01-02\")\n\n# after\nfrom openbb_core.provider.utils.errors import EmptyDataError\ntry:\n    res = obb.news.company_news(provider=\"intrinio\", symbol=\"AAPL\")\nexcept EmptyDataError:\n    res = None  # no articles in window — expected for some tickers","handlingStrategy":"try-catch","validationCode":"def news_window_plausible(start_date: str, end_date: str) -> bool:\n    from datetime import datetime\n    s, e = datetime.fromisoformat(start_date), datetime.fromisoformat(end_date)\n    return s < e and e.year >= 2000  # intrinio news coverage era","typeGuard":"from openbb_core.provider.utils.errors import EmptyDataError","tryCatchPattern":"from openbb_core.provider.utils.errors import EmptyDataError\n\ntry:\n    news = await obb.news.company_news(provider=\"intrinio\", symbol=sym)\nexcept EmptyDataError:\n    news = []  # no articles — normal outcome, continue pipeline","preventionTips":["Treat EmptyDataError as an expected result in batch/news pipelines","Widen date windows when coverage is uncertain","Don't wrap empty results in retry loops — data absence is deterministic"],"tags":["empty-data","intrinio","news","no-results"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}