{"record":{"id":"44f117fb1558be56","repo":"OpenBB-finance/OpenBB","slug":"n-join-messages-messages-contain-e-g-no-d","errorCode":null,"errorMessage":"\"\\n\".join(messages)  # messages contain e.g. 'No data was returned for, {country}' or 'The response for, {country}, was returned empty.'","messagePattern":"\"\\\\n\"\\.join\\(messages\\)  # messages contain e\\.g\\. 'No data was returned for, (.+?)' or 'The response for, (.+?), was returned empty\\.'","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/econdb/openbb_econdb/models/yield_curve.py","lineNumber":147,"sourceCode":"            if not response:\n                messages.append(f\"No data was returned for, {country}\")\n                return\n            data = response.get(\"results\")  # type: ignore\n            if not data:\n                messages.append(f\"The response for, {country}, was returned empty.\")\n                return\n            results[country] = data\n\n            return\n\n        _countries = query.country.split(\",\")\n\n        tasks = [asyncio.create_task(get_one_country(c)) for c in _countries]\n        await asyncio.gather(*tasks)\n\n        if not results and messages:\n            msg_str = \"\\n\".join(messages)\n            raise OpenBBError(msg_str)\n\n        if not results and not messages:\n            raise OpenBBError(\"Unexpected outcome -> All requests were returned empty.\")\n\n        if results and messages:\n            for message in messages:\n                warn(message)\n\n        return results\n\n    @staticmethod\n    def transform_data(\n        query: EconDbYieldCurveQueryParams,\n        data: dict,\n        **kwargs: Any,\n    ) -> AnnotatedResult[list[EconDbYieldCurveData]]:\n        \"\"\"Transform the data.\"\"\"\n        # pylint: disable=import-outside-toplevel","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/econdb/openbb_econdb/models/yield_curve.py#L129-L165","documentation":"EconDbYieldCurveFetcher.aextract_data raises OpenBBError with all accumulated per-country messages joined by newlines when every requested country failed (no results at all). The messages are of the form 'No data was returned for, {country}' (falsy response) or 'The response for, {country}, was returned empty.' (no 'results' key) — so the real cause is in the message body, not the exception type.","triggerScenarios":"economy.yield_curve(provider='econdb', country='...', date=D) where D falls on a weekend/holiday/unnegotiated day so every country's series response comes back empty; or a bad/expired token making all per-country API calls return nothing.","commonSituations":"Querying today's date when no curve was published (weekend/holiday); invalid temp token from create_token; date far in the past or future for all requested countries.","solutions":["Set date to the most recent business day (or omit it — transform_query defaults to today, so pass an explicit recent weekday if today fails).","Read each line of the message to identify whether all countries failed the same way.","Retry once in case the temp token was bad; or supply your own econdb_api_key credential.","Reduce to a single known-good country (e.g. 'united_states') to isolate the issue."],"exampleFix":"# before\nobb.economy.yield_curve(provider='econdb', date='2026-08-15')  # Saturday - no curve published\n\n# after - most recent business day\nobb.economy.yield_curve(provider='econdb', date='2026-08-13')","handlingStrategy":"try-catch","validationCode":"from datetime import date, timedelta\nd = query_date or date.today()\nwhile d.weekday() >= 5:  # back up to last weekday\n    d -= timedelta(days=1)","typeGuard":null,"tryCatchPattern":"from openbb_core.app.model.obbject import OpenBBError\ntry:\n    res = obb.economy.yield_curve(provider='econdb', country=','.join(cs), date=d)\nexcept OpenBBError as e:\n    for line in str(e).splitlines():  # per-country diagnostics\n        logger.warning(line)\n    raise","preventionTips":["Always request recent business-day dates for yield curves.","Split multi-country requests so one bad country does not sink all.","Check each newline in the message - it names the failing countries."],"tags":["yield-curve","empty-data","econdb","date-range"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}