{"record":{"id":"54e09ed9e6af0f3d","repo":"OpenBB-finance/OpenBB","slug":"str-e-or-fred-request-failed-type-e-name-54e09e","errorCode":null,"errorMessage":"{str(e) or 'FRED request failed ({type(e).__name__}).'}","messagePattern":"\\{str\\(e\\) or 'FRED request failed \\(\\{type\\(e\\)\\.__name__\\}\\)\\.'\\}","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/fred/openbb_fred/models/tips_yields.py","lineNumber":162,"sourceCode":"                params={\"release_id\": 72}, credentials=credentials\n            )\n            df = DataFrame([d.model_dump() for d in res])  # type: ignore\n            df = df.query(\"not title.str.contains('DISCONTINUED')\").set_index(\n                \"series_id\"\n            )\n\n            df[\"due\"] = df.title.apply(lambda x: x.split(\"Due \")[-1].strip()).apply(\n                to_datetime\n            )\n            df = df[[\"due\", \"observation_start\", \"observation_end\", \"title\"]]\n            return df.sort_values(by=\"due\").reset_index()  # type: ignore\n\n        try:\n            ids_df = await get_tips_series()\n            ids = ids_df.series_id.to_list()\n        except Exception as e:\n            message = str(e) or f\"FRED request failed ({type(e).__name__}).\"\n            raise OpenBBError(message) from e\n\n        # If we are looking for a specific tenor, the request will be smaller.\n        if query.maturity:\n            ids = [\n                i\n                for i in ids\n                if i.rsplit(\"DTP\", maxsplit=1)[-1].startswith(str(query.maturity))\n            ]\n        # We split the due date from the title so that we can format it as a datetime.date object.\n        due_map = ids_df.set_index(\"series_id\")[\"due\"].dt.date.to_dict()\n        # We make a seriesID-title map for later.\n        title_map = (\n            ids_df.set_index(\"series_id\")[\"title\"]\n            .str.replace(\"Treasury Inflation-Indexed\", \"TIPS\")\n            .str.replace(\"  \", \" \")\n            .str.strip()\n            .to_dict()\n        )","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/fred/openbb_fred/models/tips_yields.py#L144-L180","documentation":"Wrapper in FredTipsYieldsFetcher.aextract_data (openbb_fred/models/tips_yields.py:162): the preliminary step that lists TIPS series IDs (get_tips_series) threw a non-OpenBB exception, and it is re-raised as OpenBBError with the original text (or 'FRED request failed (TypeName)') and the original as __cause__. This step scrapes/queries the FRED TIPS yield directory, so failures here are network/parse failures, not 'no data'.","triggerScenarios":"The TIPS directory request failing (connection error, timeout); the directory payload changing shape so the title/due-date parsing raises; a proxy blocking the directory URL.","commonSituations":"The first HTTP hop of the tips-yields call failing in restricted networks; upstream FRED page format changes breaking get_tips_series parsing until a provider update.","solutions":["Inspect the wrapped message/__cause__ - it distinguishes network vs parsing failure.","Retry on transient network errors with backoff.","Update openbb-fred if FRED changed the TIPS page structure.","As a stopgap, query the DLTEN30-style TIPS series directly via fred_series."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"from openbb_core.app.model.abstract.error import OpenBBError\nimport time\n\nfor delay in (0, 5, 30):\n    if delay:\n        time.sleep(delay)\n    try:\n        res = obb.economy.fred.tips_yields()\n        break\n    except OpenBBError as e:\n        if delay == 30:\n            raise RuntimeError(f'TIPS listing failed: {e.__cause__ or e}') from e","preventionTips":["The TIPS ID listing is a separate upstream call - expect it to fail independently of the data fetch.","Pin tested provider versions and update promptly when FRED page formats change."],"tags":["fred","tips","wrapper","network","parsing"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}