{"record":{"id":"104c2d2e0aa38525","repo":"OpenBB-finance/OpenBB","slug":"the-request-was-returned-empty-with-no-error-messa","errorCode":null,"errorMessage":"The request was returned empty with no error messages.","messagePattern":"The request was returned empty with no error messages\\.","errorType":"exception","errorClass":"EmptyDataError","httpStatus":null,"severity":"warning","filePath":"openbb_platform/providers/eia/openbb_us_eia/models/short_term_energy_outlook.py","lineNumber":222,"sourceCode":"                            res.get(\"request\", {}).get(\"params\", {}).get(\"facets\", {}).get(\"seriesId\", [])  # type: ignore\n                        )\n                        masked_url = url.replace(api_key, \"API_KEY\")\n                        messages.append(\n                            f\"No additional data returned for {series_id or masked_url}\"\n                        )\n                    if additional_data:\n                        results.extend(additional_data)\n                    n_results += len(additional_data)\n                    url = url.replace(f\"&offset={offset}\", f\"&offset={offset + 5000}\")\n                    offset += 5000\n\n        try:\n            await asyncio.gather(*[get_one(url) for url in urls])\n        except Exception as e:\n            raise OpenBBError(f\"Error fetching data from the EIA API -> {e}\") from e\n\n        if not results and not messages:\n            raise EmptyDataError(\n                \"The request was returned empty with no error messages.\"\n            )\n        if not results and messages:\n            raise OpenBBError(\"\\n\".join(messages))\n        if results and messages:\n            warn(\"\\n\".join(messages))\n\n        return results\n\n    @staticmethod\n    def transform_data(\n        query: EiaShortTermEnergyOutlookQueryParams,\n        data: list[dict],\n        **kwargs: Any,\n    ) -> list[EiaShortTermEnergyOutlookData]:\n        \"\"\"Transform the data.\"\"\"\n        # pylint: disable=import-outside-toplevel\n        from pandas import Categorical, DataFrame, to_datetime","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/eia/openbb_us_eia/models/short_term_energy_outlook.py#L204-L240","documentation":"Raised by the EIA Short-Term Energy Outlook extract when every request completed without raising yet the results list is empty and no warning messages were collected — i.e. the API accepted the requests but returned no data records and no explanatory error fields. EmptyDataError (not OpenBBError), so the framework treats it as 'no data available' rather than a failure.","triggerScenarios":"Valid API call whose series_id set returns empty response data (discontinued series, future-dated projections outside range); empty responses parsed to zero records without triggering the no-additional-data message path.","commonSituations":"Querying discontinued or renamed EIA series IDs; date/parameter combos with no published rows yet; API behavior changes returning empty data arrays instead of errors.","solutions":["Verify the series/facet combination exists in EIA's STEO API and currently has published data.","Loosen or remove restrictive query filters (dates) and retry.","Treat EmptyDataError as 'no data' in caller logic rather than retrying blindly.","Update the provider package — series mappings are maintained there."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"from openbb_core.provider.abstract.fetcher import EmptyDataError\n\ntry:\n    res = await obb.energy.short_term_energy_outlook(provider='eia')\nexcept EmptyDataError:\n    logger.info('EIA STEO returned no rows for this query — skipping')\n    res = None","preventionTips":["Catch EmptyDataError separately from OpenBBError and treat as empty result","Validate series choices exist before scheduling bulk queries"],"tags":["eia","steo","empty-data","api"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}