{"record":{"id":"90f30e79ebedfa76","repo":"OpenBB-finance/OpenBB","slug":"empty-e","errorCode":null,"errorMessage":"\n[Empty] -> {e}","messagePattern":"\n\\[Empty\\] -> (.+?)","errorType":"exception","errorClass":"EmptyDataError","httpStatus":null,"severity":"warning","filePath":"openbb_platform/core/openbb_core/app/static/utils/decorators.py","lineNumber":98,"sourceCode":"                        \"...\"\n                        if msg == \"Missing required argument\"\n                        else err.get(\"input\", \"\")\n                    )\n                    prefix = f\"[Data Model] {e.title}\\n\" if \"Data\" in e.title else \"\"\n                    error_list.append(\n                        f\"{prefix}[Arg] {loc} -> input: {_input} -> {msg}\"\n                    )\n                error_list.insert(0, validation_error)\n                error_str = \"\\n\".join(error_list)\n                raise OpenBBError(f\"\\n[Error] -> {error_str}\").with_traceback(\n                    tb\n                ) from None\n            if isinstance(e, UnauthorizedError):\n                raise UnauthorizedError(f\"\\n[Error] -> {e}\").with_traceback(\n                    tb\n                ) from None\n            if isinstance(e, EmptyDataError):\n                raise EmptyDataError(f\"\\n[Empty] -> {e}\").with_traceback(tb) from None\n            if isinstance(e, OpenBBError):\n                raise OpenBBError(f\"\\n[Error] -> {e}\").with_traceback(tb) from None\n            if isinstance(e, Exception):\n                raise OpenBBError(\n                    f\"\\n[Unexpected Error] -> {e.__class__.__name__} -> {e}\"\n                ).with_traceback(tb) from None\n\n        return None\n\n    return wrapper\n","sourceCodeStart":80,"sourceCodeEnd":109,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/core/openbb_core/app/static/utils/decorators.py#L80-L109","documentation":"Raised when the wrapped command raised EmptyDataError - the provider fetch succeeded but returned zero rows for the request. The decorator prefixes '[Empty] ->' and re-raises EmptyDataError with the original traceback so callers can handle 'no data' distinctly from hard errors.","triggerScenarios":"Querying a symbol/date range with no data: obb.equity.price.historical('INVALID', start_date='2075-01-01'); a ticker delisted before the requested range; a provider legitimately having no records for the filters given.","commonSituations":"Misspelled ticker; date range outside the symbol's listing history; weekend/holiday-only range for daily data; filters (e.g. market cap thresholds) excluding all rows; provider coverage gaps for small-cap or foreign symbols.","solutions":["Verify the symbol exists and is covered by the chosen provider","Widen or correct the date range / filters so at least one record matches","Catch EmptyDataError and treat it as an empty result rather than a failure in downstream code","Try a different provider that covers the instrument"],"exampleFix":"# before\ntry:\n    res = obb.equity.price.historical('BRK.A')\nexcept Exception as e:\n    raise  # any error looks the same\n\n# after\nfrom openbb_core.app.model.empty_error import EmptyDataError\ntry:\n    res = obb.equity.price.historical('BRK-A')\nexcept EmptyDataError:\n    res = None  # no data, handle gracefully","handlingStrategy":"try-catch","validationCode":"def range_has_sessions(start, end) -> bool:\n    \"\"\"Rough guard: at least one weekday between the dates.\"\"\"\n    import pandas as pd\n    days = pd.bdate_range(start, end)\n    return len(days) > 0","typeGuard":null,"tryCatchPattern":"from openbb_core.provider.abstract.error import EmptyDataError\n\ntry:\n    res = obb.equity.price.historical('AAPL', start_date='2024-01-01')\nexcept EmptyDataError:\n    res = None  # no data for this request - not a failure","preventionTips":["Treat EmptyDataError as an expected outcome in pipelines, not a crash","Validate tickers and date ranges before requesting","Try alternate providers when coverage gaps appear"],"tags":["openbb","empty-data","provider","no-results"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}