{"record":{"id":"6017cc74f4c7a414","repo":"OpenBB-finance/OpenBB","slug":"unexpected-error-e-class-name","errorCode":null,"errorMessage":"\n[Unexpected Error] -> {e.__class__.__name__} -> {e}","messagePattern":"\n\\[Unexpected Error\\] -> (.+?) -> (.+?)","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/core/openbb_core/app/static/utils/decorators.py","lineNumber":102,"sourceCode":"                    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":84,"sourceCodeEnd":109,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/core/openbb_core/app/static/utils/decorators.py#L84-L109","documentation":"The last-resort branch of the exception decorator: the wrapped command raised an exception that is none of ValidationError, UnauthorizedError, EmptyDataError, or OpenBBError - i.e. an unexpected third-party error (KeyError, requests.ConnectionError, JSONDecodeError, provider library bug). It is re-raised as OpenBBError including the original class name and message, with the original traceback attached for debugging.","triggerScenarios":"A provider fetcher hitting a network timeout/SSL error, a KeyError from a malformed provider response, a pandas/numpy error during data transformation, or any bug inside a router extension - all surfacing through a decorated command call.","commonSituations":"Provider API changed response shape (KeyError/TypeError on parsing); transient network failures; incompatible package versions between openbb-core and a provider; broken proxy/DNS preventing the HTTP call.","solutions":["Note the class name in the message (e.g. 'ConnectionError', 'KeyError') - it identifies the real failure","Set OPENBB_DEBUG_MODE=true and re-run for the full traceback","Upgrade the provider package and openbb-core to matching versions (pip install -U openbb)","If it is a network error, check connectivity/proxy; if a parsing bug, report it to the provider package repo"],"exampleFix":"# before\nres = obb.equity.price.historical('AAPL', provider='xyz')  # [Unexpected Error] -> KeyError\n\n# after\nimport openbb\nopenbb.system.set_debug_mode(True)\nres = obb.equity.price.historical('AAPL', provider='xyz')  # full traceback now printed","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"from openbb_core.app.model.abstract.error import OpenBBError\n\ntry:\n    res = obb.equity.price.historical('AAPL', provider='xyz')\nexcept OpenBBError as e:\n    msg = str(e)\n    if '[Unexpected Error]' in msg:\n        # inspect original class name embedded in message; enable debug for traceback\n        openbb.system.set_debug_mode(True) if False else None\n        raise\n    raise","preventionTips":["Pin compatible openbb-core and provider versions in requirements","Run a smoke-test command at deploy time to catch environment breakage early","Set OPENBB_DEBUG_MODE=true in dev to get full tracebacks for these"],"tags":["openbb","unexpected-error","debugging","decorator"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}