{"record":{"id":"b2b6187f8772234e","repo":"OpenBB-finance/OpenBB","slug":"join-messages","errorCode":null,"errorMessage":", \".join(messages)","messagePattern":", \"\\.join\\(messages\\)","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/deribit/openbb_deribit/models/options_chains.py","lineNumber":234,"sourceCode":"                        **stats,\n                        **greeks,\n                    }\n                    result[\"dte\"] = (\n                        result[\"expiration\"] - to_datetime(\"today\").date()\n                    ).days\n                    results.append(result)\n\n                    if len(received_symbols) == len(symbols):\n                        await websocket.close()\n                        break\n\n        tasks = [\n            asyncio.create_task(call_api(expiration)) for expiration in symbols_dict\n        ]\n        await asyncio.gather(*tasks, return_exceptions=True)\n\n        if messages and not results:\n            raise OpenBBError(\", \".join(messages))\n\n        if results and messages:\n            for message in messages:\n                warn(message)\n\n        if not results and not messages:\n            raise EmptyDataError(\"All requests returned empty with no error messages.\")\n\n        return results\n\n    @staticmethod\n    def transform_data(\n        query: DeribitOptionsChainsQueryParams,\n        data: list[dict],\n        **kwargs: Any,\n    ) -> DeribitOptionsChainsData:\n        \"\"\"Transform the data.\"\"\"\n        # pylint: disable=import-outside-toplevel","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/deribit/openbb_deribit/models/options_chains.py#L216-L252","documentation":"OpenBBError raised after all per-expiration websocket tasks complete when at least one task deposited an error message into the shared `messages` set and NO results were collected. The message text is the joined set of per-expiration error strings produced inside call_api (e.g. websocket timeouts waiting for subscribed instruments to deliver data).","triggerScenarios":"Every expiration's websocket subscription failed to receive quotes for all its contracts within the internal deadline (illiquid strikes never tick, or Deribit delayed sends), so results stays empty while messages accumulates errors. Also fires when symbols_dict maps expirations to empty/invalid contract lists.","commonSituations":"Fetching chains for illiquid underlyings (XRP, BNB, PAXG far-dated expirations) where many strikes have no live quotes, slow networks that miss the per-expiration deadline, or Deribit under load.","solutions":["Retry — quote delivery is time-based and often succeeds on a second attempt.","Retry once more; if the joined messages mention specific expirations, narrow the request to those and retry individually.","Prefer liquid underlyings/expirations (BTC/ETH near-dated) when testing, since every contract in an expiry must tick before the deadline.","If persistent, capture the websocket traffic to see whether Deribit is sending quotes at all for those instruments."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"from openbb_core.provider.utils.errors import OpenBBError\nattempts = 0\nwhile True:\n    try:\n        chains = obb.derivatives.options.chains(symbol=sym, provider=\"deribit\")\n        break\n    except OpenBBError as e:\n        attempts += 1\n        if attempts >= 3:\n            raise\n        time.sleep(attempts * 2)  # websocket deadlines: transient under load","preventionTips":["Test with liquid underlyings (BTC/ETH, near-dated expirations) first.","Retry at least once before reporting failure — quote delivery is deadline-based.","Avoid fetching chains for many underlyings in rapid succession."],"tags":["deribit","options","websocket","timeout","illiquid"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}