{"record":{"id":"af136e267c8a6405","repo":"OpenBB-finance/OpenBB","slug":"openbberror-e-from-e","errorCode":null,"errorMessage":"OpenBBError(e) from e","messagePattern":"OpenBBError\\(e\\) from e","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/deribit/openbb_deribit/models/options_chains.py","lineNumber":138,"sourceCode":"        **kwargs: Any,\n    ) -> list[dict]:\n        \"\"\"Extract the data.\"\"\"\n        # pylint: disable=import-outside-toplevel\n        import asyncio  # noqa\n        import json\n        import websockets\n        from openbb_deribit.utils.helpers import get_options_symbols\n        from pandas import to_datetime\n        from websockets.asyncio.client import connect\n        from warnings import warn\n\n        # We need to identify each option contract in order to fetch the chains data.\n        symbols_dict: dict[str, str] = {}\n\n        try:\n            symbols_dict = await get_options_symbols(query.symbol)  # type: ignore\n        except OpenBBError as e:\n            raise OpenBBError(e) from e\n\n        # For each expiration, we need to create a websocket connection to fetch the data.\n        # We subscribe to each contract symbol and break the connection when we have all the data for an expiry.\n        # If it takes too long, we break the connection and return an error message.\n        results: list = []\n        messages: set = set()\n\n        async def call_api(expiration):\n            \"\"\"Call the Deribit API.\"\"\"\n            symbols = symbols_dict[expiration]\n            received_symbols: set = set()\n            msg = {\n                \"jsonrpc\": \"2.0\",\n                \"id\": 3600,\n                \"method\": \"public/subscribe\",\n                \"params\": {\"channels\": [\"ticker.\" + d + \".100ms\" for d in symbols]},\n            }\n            async with connect(\"wss://www.deribit.com/ws/api/v2\") as websocket:","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/deribit/openbb_deribit/models/options_chains.py#L120-L156","documentation":"Re-raise point in DeribitOptionsChains.aextract_data when fetching the options symbol dictionary (get_options_symbols) fails with an OpenBBError — typically the wrapped 'Failed to get instruments' network failure from helpers. The `raise OpenBBError(e) from e` adds no new information; it just propagates the upstream failure into the chain-fetch context.","triggerScenarios":"Any network failure while listing option instruments for the underlying (the call hits /public/get_instruments before any websocket work starts). This occurs before websocket connections are opened, so the error appears immediately, not after a timeout.","commonSituations":"Blocked egress to deribit.com in containers/CI, transient Deribit outages, or aggressive rate limiting from repeated chain requests.","solutions":["Verify connectivity to https://www.deribit.com and retry — the underlying cause is almost always the instrument-listing HTTP request failing.","Inspect the chained exception (`__cause__`) for the real failure class (timeout, DNS, HTTP error).","Add spacing between repeated options.chains calls to avoid rate limiting.","If behind a proxy, set HTTP(S)_PROXY so amake_request can reach Deribit."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"from openbb_core.provider.utils.errors import OpenBBError\ntry:\n    chains = obb.derivatives.options.chains(symbol=\"BTC\", provider=\"deribit\")\nexcept OpenBBError as e:\n    cause = e.__cause__\n    if \"Failed to get instruments\" in str(cause or e):\n        chains = retry_with_backoff(lambda: obb.derivatives.options.chains(symbol=\"BTC\", provider=\"deribit\"))\n    else:\n        raise","preventionTips":["Check the chained __cause__ — the real failure is the instrument-listing HTTP call.","Ensure network/proxy access before running chain fetches.","Space out repeated options.chains calls to avoid rate limits."],"tags":["deribit","options","network","propagation","chains"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}