{"record":{"id":"d4947ddb4efd4cf5","repo":"OpenBB-finance/OpenBB","slug":"no-data-was-returned","errorCode":null,"errorMessage":"No data was returned.","messagePattern":"No data was returned\\.","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/ecb/openbb_ecb/models/yield_curve.py","lineNumber":106,"sourceCode":"\n            if use_cache is True:\n                cache_dir = f\"{get_user_cache_directory()}/http/ecb_yield_curve\"\n                async with CachedSession(\n                    cache=SQLiteBackend(cache_dir, expire_after=3600 * 4)\n                ) as session:\n                    await session.delete_expired_responses()\n                    try:\n                        response = await amake_request(\n                            url,\n                            session=session,  # type: ignore\n                        )\n                    finally:\n                        await session.close()\n            else:\n                response = await amake_request(url=url)\n\n            if not response:\n                raise OpenBBError(\"No data was returned.\")\n\n            if isinstance(response, list):\n                for item in response:\n                    d = {\n                        \"date\": item.get(\"PERIOD\"),\n                        \"maturity\": maturity,\n                        \"rate\": item.get(\"OBS_VALUE_AS_IS\"),\n                    }\n                    results.append(d)\n\n        tasks = [get_one(maturity, query.use_cache) for maturity in MATURITIES]\n\n        await asyncio.gather(*tasks)\n\n        return results\n\n    @staticmethod\n    def transform_data(","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/ecb/openbb_ecb/models/yield_curve.py#L88-L124","documentation":"Raised inside the ECB yield-curve fetcher's per-maturity task when the response from data.ecb.europa.eu/data-detail-api/{series_id} is falsy (None, empty list, or empty dict). Each of the ~30+ maturity series is fetched independently, so one dead/empty series fails the whole asyncio.gather call.","triggerScenarios":"Calling obb.fixedincome.government_yield_curve(provider=\"ecb\", ...).get() when any single maturity series id returns an empty body — commonly a discontinued series (ECB occasionally re-baskets series), or a cached empty response replayed by aiohttp_client_cache when use_cache=True.","commonSituations":"ECB retires/renames a series id in yield_curve_series.py after the provider release; stale SQLite HTTP cache containing an empty 200 response; transient empty responses during ECB maintenance windows.","solutions":["Retry with use_cache=False to rule out a cached empty response: obb.fixedincome.government_yield_curve(provider='ecb', use_cache=False).","Update the openbb-ecb provider (pip install -U openbb-ecb) so yield_curve_series ids match the current ECB series.","Clear the cache directory (<user_cache>/http/ecb_yield_curve) if old empty responses persist.","Fall back to another provider for yield curves if ECB is mid-incident."],"exampleFix":"# before\ndata = obb.fixedincome.government_yield_curve(provider=\"ecb\")  # one empty series kills all\n\n# after\ndata = obb.fixedincome.government_yield_curve(provider=\"ecb\", use_cache=False)","handlingStrategy":"retry","validationCode":"import requests\n\ndef maturity_series_ok(series_id: str) -> bool:\n    r = requests.get(f\"https://data.ecb.europa.eu/data-detail-api/{series_id}\", timeout=10)\n    return r.status_code == 200 and bool(r.json())","typeGuard":null,"tryCatchPattern":"from openbb_core.provider.utils.errors import OpenBBError\ntry:\n    curve = obb.fixedincome.government_yield_curve(provider=\"ecb\")\nexcept OpenBBError as e:\n    if \"No data was returned\" in str(e):\n        curve = obb.fixedincome.government_yield_curve(provider=\"ecb\", use_cache=False)  # retry fresh\n    else:\n        raise","preventionTips":["Pass use_cache=False when diagnosing; a cached empty response reproduces this error forever.","Keep openbb-ecb updated so ECB series-id re-baskets are picked up.","Clear <user_cache>/http/ecb_yield_curve after ECB incidents."],"tags":["ecb","yield-curve","empty-response","cache","series-id"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}