{"record":{"id":"7c24660262849003","repo":"OpenBB-finance/OpenBB","slug":"the-request-was-successful-but-was-returned-empty","errorCode":null,"errorMessage":"The request was successful but was returned empty.","messagePattern":"The request was successful but was returned empty\\.","errorType":"exception","errorClass":"EmptyDataError","httpStatus":null,"severity":"warning","filePath":"openbb_platform/providers/intrinio/openbb_intrinio/models/forward_ebitda_estimates.py","lineNumber":166,"sourceCode":"                while data.get(\"next_page\"):  # type: ignore\n                    next_page = data[\"next_page\"]  # type: ignore\n                    next_url = f\"{url}&next_page={next_page}\"\n                    data = await amake_request(next_url, session=session, **kwargs)\n                    consensus = (\n                        data.get(\"ebitda_consensus\")\n                        if isinstance(data, dict) and \"ebitda_consensus\" in data\n                        else []\n                    )\n                    if consensus:\n                        results.extend(consensus)  # type: ignore\n            return results\n\n        url = f\"{BASE_URL}&{query_str}\" if query_str else BASE_URL\n\n        results = await amake_request(url, response_callback=fetch_callback, **kwargs)  # type: ignore\n\n        if not results:\n            raise EmptyDataError(\"The request was successful but was returned empty.\")\n\n        return results\n\n    @staticmethod\n    def transform_data(\n        query: IntrinioForwardEbitdaEstimatesQueryParams,\n        data: list[dict],\n        **kwargs: Any,\n    ) -> list[IntrinioForwardEbitdaEstimatesData]:\n        \"\"\"Transform the raw data into the standard format.\"\"\"\n        if not data:\n            raise EmptyDataError()\n        results: list[IntrinioForwardEbitdaEstimatesData] = []\n        fiscal_period = None\n        if query.fiscal_period is not None:\n            fiscal_period = \"fy\" if query.fiscal_period == \"annual\" else \"fq\"\n        for item in data:\n            estimate_count = item.get(\"estimate_count\")","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/intrinio/openbb_intrinio/models/forward_ebitda_estimates.py#L148-L184","documentation":"EmptyDataError raised at the end of the bulk path of IntrinioForwardEbitdaEstimatesFetcher: the paginated request(s) completed without error but 'results' accumulated no ebitda_consensus records, so the fetcher raises before transform.","triggerScenarios":"The consensus endpoint returns valid JSON with an empty (or absent) 'ebitda_consensus' list on the first page — e.g. filter parameters matching no securities, or the account having estimates coverage for nothing the query selects. Distinct from per-symbol mode, which raises error 675 instead.","commonSituations":"Query-wide filters (dates, universes) that match no covered companies; calling the bulk mode expecting broad coverage on a limited plan; first-page empty while later pagination would have had data (not traversed because the loop is gated on estimates being non-empty).","solutions":["Relax or remove query filters so more securities are covered","Switch to per-symbol requests for the specific tickers you need (that path warns per symbol instead)","Confirm plan coverage for analyst estimates data"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"def bulk_query_has_scope(symbols_of_interest: list[str]) -> bool:\n    # bulk mode returns empty when filters match no covered securities\n    return bool(symbols_of_interest)","typeGuard":"from openbb_core.provider.utils.errors import EmptyDataError","tryCatchPattern":"from openbb_core.provider.utils.errors import EmptyDataError\n\ntry:\n    res = await obb.equity.estimates.ebitda(provider=\"intrinio\")\nexcept EmptyDataError:\n    # fall back to per-symbol mode, which warns per symbol instead\n    res = await obb.equity.estimates.ebitda(provider=\"intrinio\", symbol=\",\".join(syms))","preventionTips":["Prefer per-symbol mode when you know the tickers — better failure granularity","Loosen filters when the bulk query matches nothing","Treat empty bulk results as a coverage signal, not an error"],"tags":["estimates","ebitda","intrinio","empty-data","no-results"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}