OpenBB-finance/OpenBB · error · OpenBBError

Unexpected outcome -> All requests were returned empty.

Error message

Unexpected outcome -> All requests were returned empty.

What it means

Defensive OpenBBError in EconDbYieldCurveFetcher.aextract_data for the state where all per-country tasks completed yet neither the results dict nor the messages list is populated. In practice it is nearly unreachable: a falsy response or empty 'results' always appends a message first. Hitting it indicates the task set was effectively empty or control flow changed (e.g. a provider regression), not a data condition.

Source

Thrown at openbb_platform/providers/econdb/openbb_econdb/models/yield_curve.py:150

            data = response.get("results")  # type: ignore
            if not data:
                messages.append(f"The response for, {country}, was returned empty.")
                return
            results[country] = data

            return

        _countries = query.country.split(",")

        tasks = [asyncio.create_task(get_one_country(c)) for c in _countries]
        await asyncio.gather(*tasks)

        if not results and messages:
            msg_str = "\n".join(messages)
            raise OpenBBError(msg_str)

        if not results and not messages:
            raise OpenBBError("Unexpected outcome -> All requests were returned empty.")

        if results and messages:
            for message in messages:
                warn(message)

        return results

    @staticmethod
    def transform_data(
        query: EconDbYieldCurveQueryParams,
        data: dict,
        **kwargs: Any,
    ) -> AnnotatedResult[list[EconDbYieldCurveData]]:
        """Transform the data."""
        # pylint: disable=import-outside-toplevel
        from numpy import nan
        from pandas import Categorical, DataFrame, DatetimeIndex

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Ensure a valid country is supplied (one accepted by the validator).
  2. Upgrade openbb-econdb and openbb-core together to matching versions.
  3. Re-run with a single known-good country; if reproducible, file a provider issue with the exact parameters.
Defensive patterns

Strategy: try-catch

Validate before calling

countries = [c for c in query.country.split(',') if c]
if not countries:
    raise ValueError('country parameter is empty')

Try / catch

from openbb_core.app.model.obbject import OpenBBError
try:
    res = obb.economy.yield_curve(provider='econdb', country='united_states')
except OpenBBError as e:
    if 'Unexpected outcome' in str(e):
        logger.error('provider invariant violated - upgrade openbb-econdb/openbb-core together')
    raise

Prevention

When it happens

Trigger: Theoretically: query.country splitting into no processable entries, or a future code path where get_one_country returns without touching results/messages. Real occurrences usually mean a bug in the provider version in use.

Common situations: Edge-case inputs (empty country string behavior); mismatched provider/core versions after a partial upgrade.

Related errors


AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14). Data as JSON: /api/errors/f2464bacb21d0153. Report an issue: GitHub.