{"record":{"id":"087ef843cdcf7039","repo":"OpenBB-finance/OpenBB","slug":"there-was-an-error-with-the-request-and-was-return-087ef8","errorCode":null,"errorMessage":"There was an error with the request and was returned empty.","messagePattern":"There was an error with the request and was returned empty\\.","errorType":"exception","errorClass":"EmptyDataError","httpStatus":null,"severity":"warning","filePath":"openbb_platform/providers/fred/openbb_fred/models/tips_yields.py","lineNumber":243,"sourceCode":"        records = df.to_dict(orient=\"records\")\n        output = {\n            \"records\": records,\n            \"meta\": meta,\n        }\n\n        return output\n\n    @staticmethod\n    def transform_data(\n        query: FredTipsYieldsQueryParams,\n        data: dict,\n        **kwargs: Any,\n    ) -> AnnotatedResult[list[FredTipsYieldsData]]:\n        \"\"\"Transform the data.\"\"\"\n        results = data.get(\"records\", [])\n        meta = data.get(\"meta\", {})\n        if not results:\n            raise EmptyDataError(\n                \"There was an error with the request and was returned empty.\"\n            )\n\n        return AnnotatedResult(\n            result=[FredTipsYieldsData.model_validate(r) for r in results],\n            metadata=meta,\n        )\n","sourceCodeStart":225,"sourceCodeEnd":251,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/fred/openbb_fred/models/tips_yields.py#L225-L251","documentation":"Raised in FredTipsYieldsFetcher.transform_data (openbb_fred/models/tips_yields.py:243) when the 'records' list handed from extract_data is empty. By this point the TIPS ID list was fetched and the series data retrieved, so an empty records list means the melt/filtering of observations produced nothing - typically every observation was NaN or the maturity filter removed all series. An EmptyDataError.","triggerScenarios":"Passing a maturity value that matches no TIPS series (e.g. maturity=7, which TIPS do not come in - tenors are 5/10/20/30); all observations null in the requested window.","commonSituations":"Assuming any integer maturity exists; combining maturity filters with date ranges that exclude all observations.","solutions":["Use a real TIPS tenor: 5, 10, 20, or 30.","Drop the maturity filter to fetch all tenors, then slice locally.","Clear date filters and retry."],"exampleFix":"# before - TIPS are not issued at 7y\nobb.economy.fred.tips_yields(maturity=7)\n\n# after\nobb.economy.fred.tips_yields(maturity=10)","handlingStrategy":"validation","validationCode":"VALID_TIPS_TENORS = {5, 10, 20, 30}\n\nif maturity is not None and int(maturity) not in VALID_TIPS_TENORS:\n    maturity = min(VALID_TIPS_TENORS, key=lambda t: abs(t - maturity))  # snap to nearest issued tenor","typeGuard":"def is_issued_tips_tenor(m: object) -> bool:\n    \"\"\"True when m is one of the TIPS maturities FRED publishes (5, 10, 20, 30 years).\"\"\"\n    return isinstance(m, (int, float)) and not isinstance(m, bool) and int(m) in {5, 10, 20, 30}","tryCatchPattern":"from openbb_core.provider.utils.errors import EmptyDataError\n\ntry:\n    res = obb.economy.fred.tips_yields(maturity=maturity)\nexcept EmptyDataError:\n    res = obb.economy.fred.tips_yields()  # all tenors; slice locally","preventionTips":["Restrict maturity choices to 5/10/20/30 - other values silently filter out every series.","Fetch all tenors once and cache; the curve set is small."],"tags":["fred","tips","maturity","empty-data"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}