{"record":{"id":"7ffce45af5774bae","repo":"OpenBB-finance/OpenBB","slug":"no-data-was-in-the-response","errorCode":null,"errorMessage":"No data was in the response","messagePattern":"No data was in the response","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/econdb/openbb_econdb/utils/helpers.py","lineNumber":526,"sourceCode":"            cache=SQLiteBackend(cache_dir, expire_after=3600 * 24)\n        ) as session:\n            try:\n                response = await amake_requests(urls, session=session)\n            finally:\n                await session.close()\n    else:\n        response = await amake_requests(urls)\n    return response\n\n\ndef parse_context(  # pylint: disable=R0912, R0914, R0915\n    response: list[dict], latest: bool = False, with_metadata: bool = False\n) -> DataFrame | tuple[DataFrame, dict]:\n    \"\"\"Parse the output from `get_context()`, and optionally return the metadata.\"\"\"\n    metadata = {}\n    results = DataFrame()\n    if response is None:\n        raise OpenBBError(\"No data was in the response\")\n    if not isinstance(response, list):\n        raise OpenBBError(\"Expecting a list of dictionaries and received a dictionary.\")\n    for item in response:\n        symbol = item.get(\"id\", \"\")\n        _symbol = symbol.split(\"~\")[0].replace(\"19\", \"\")\n        temp_unit = \"\"\n        temp_meta = item.get(\"td\", {})\n        temp_data = item.get(\"dataarray\", [])\n        temp_transform = symbol.split(\"~\")[1] if \"~\" in symbol else \"\"\n        temp_country = item.get(\"geography\", {}).get(\"name\", \"\")\n        temp_country = temp_country.replace(\" (19 countries)\", \"\")\n        # We need the metadata to process the results.\n        if temp_meta:\n            temp_unit = temp_meta.get(\"units\", \"\")\n            temp_scale = temp_meta.get(\"scale\", \"\")\n            if temp_transform:\n                if temp_transform in [\"TOYA\", \"TPOP\", \"TPGP\"]:\n                    temp_unit = \"Percent\"","sourceCodeStart":508,"sourceCodeEnd":544,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/econdb/openbb_econdb/utils/helpers.py#L508-L544","documentation":"parse_context in openbb_econdb.utils.helpers post-processes responses from get_context (the multi-ticker series fetcher used by econdb macro endpoints). If response is None — meaning the underlying amake_requests produced nothing at all (all requests failed or were skipped) — it raises OpenBBError('No data was in the response'). This indicates the fetching layer, not the parsing of individual items.","triggerScenarios":"Calling an econdb endpoint that funnels through get_context/parse_context (e.g. economy.econdb-style series queries) with tickers the API does not recognize, an invalid/expired token, or network failures, so the aggregated response is None instead of a list of series objects.","commonSituations":"Misspelled ticker symbols; symbol format ignoring the required '~transform' or country suffix; temp token invalidated mid-session; upstream outage.","solutions":["Verify each ticker individually against EconDB's series search (https://www.econdb.com/api/series/?ticker=...).","Re-run with use_cache=False to rule out a poisoned cache entry.","Supply your own econdb_api_key if the temp-token path is failing.","Retry later if all tickers previously worked — a sudden None response points to upstream unavailability."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"from openbb_econdb.utils.helpers import get_indicator_countries  # sanity only; None-response means fetch-layer failure","typeGuard":"def is_series_list(response) -> bool:\n    \"\"\"Guard: get_context must yield a list of per-ticker dicts.\"\"\"\n    return isinstance(response, list) and all(isinstance(i, dict) for i in response)","tryCatchPattern":"from openbb_core.app.model.obbject import OpenBBError\ntry:\n    df = parse_context(await get_context(symbols))\nexcept OpenBBError as e:\n    if 'No data was in the response' in str(e):\n        logger.warning('econdb fetch produced nothing - check tickers/token/network')\n    raise","preventionTips":["Verify ticker format against the EconDB API before batch requests.","Use use_cache=False when debugging to bypass stale cached failures.","Keep a valid econdb_api_key configured so token issues are ruled out."],"tags":["empty-data","symbols","econdb","network"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}