{"record":{"id":"a482071f2accdda7","repo":"OpenBB-finance/OpenBB","slug":"the-request-was-returned-empty-a48207","errorCode":null,"errorMessage":"The request was returned empty.","messagePattern":"The request was returned empty\\.","errorType":"exception","errorClass":"EmptyDataError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/fmp/openbb_fmp/models/revenue_business_line.py","lineNumber":70,"sourceCode":"        # pylint: disable=import-outside-toplevel\n        from openbb_fmp.utils.helpers import get_data_many\n\n        api_key = credentials.get(\"fmp_api_key\") if credentials else \"\"\n        base_url = (\n            \"https://financialmodelingprep.com/stable/revenue-product-segmentation?\"\n        )\n        url = f\"{base_url}symbol={query.symbol}&period={query.period}&structure=flat&apikey={api_key}\"\n        return await get_data_many(url, **kwargs)\n\n    @staticmethod\n    def transform_data(\n        query: FMPRevenueBusinessLineQueryParams,\n        data: list[dict],\n        **kwargs: Any,\n    ) -> list[FMPRevenueBusinessLineData]:\n        \"\"\"Return the transformed data.\"\"\"\n        if not data:\n            raise EmptyDataError(\"The request was returned empty.\")\n\n        results: list = []\n        # We need to flatten the data.\n        for item in data:\n            period_ending = item.get(\"date\")\n            fiscal_year = item.get(\"fiscalYear\")\n            fiscal_period = item.get(\"period\")\n            segment = item.get(\"data\", {})\n\n            for business_line, revenue_value in segment.items():\n                if revenue_value is not None:\n                    revenue = int(revenue_value) if revenue_value is not None else None\n                    if revenue is not None:\n                        results.append(\n                            FMPRevenueBusinessLineData.model_validate(\n                                {\n                                    \"period_ending\": period_ending,\n                                    \"fiscal_year\": fiscal_year,","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/fmp/openbb_fmp/models/revenue_business_line.py#L52-L88","documentation":"Error \"The request was returned empty.\" thrown in OpenBB-finance/OpenBB.","triggerScenarios":"Thrown at openbb_platform/providers/fmp/openbb_fmp/models/revenue_business_line.py:70 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the symbol is a valid ticker with reported segment revenue on FMP.","Try a different fiscal period or symbol.","Check that your FMP plan includes revenue segmentation data."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}