{"record":{"id":"9a96a9ecafc0b719","repo":"nautechsystems/nautilus_trader","slug":"unsupported-subscribed-rtds-message-topic-topic","errorCode":null,"errorMessage":"unsupported subscribed RTDS message topic={topic} type={msg_type}","messagePattern":"unsupported subscribed RTDS message topic=(.+?) type=(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/polymarket/src/rtds.rs","lineNumber":1184,"sourceCode":"            (\"crypto_prices\", \"update\") => {\n                self.handle_crypto_price_update(envelope);\n            }\n            (\"crypto_prices_twap_thirty\", \"update\") => {\n                self.handle_crypto_twap_update(envelope, RtdsCryptoTwapWindow::ThirtySeconds)?;\n            }\n            (\"crypto_prices_twap_sixty\", \"update\") => {\n                self.handle_crypto_twap_update(envelope, RtdsCryptoTwapWindow::SixtySeconds)?;\n            }\n            (\"equity_prices\", \"subscribe\") => {\n                self.handle_equity_price_subscribe(envelope);\n            }\n            (\"equity_prices\", \"update\") => {\n                self.handle_equity_price_update(envelope);\n            }\n            (topic @ (\"crypto_prices_twap_thirty\" | \"crypto_prices_twap_sixty\"), msg_type)\n                if self.has_topic_subscription(topic) =>\n            {\n                anyhow::bail!(\"unsupported subscribed RTDS message topic={topic} type={msg_type}\");\n            }\n            _ => {\n                log::debug!(\n                    \"Ignoring unsupported RTDS message topic={} type={}\",\n                    envelope.topic,\n                    envelope.msg_type,\n                );\n            }\n        }\n        Ok(())\n    }\n\n    fn handle_crypto_price_update(&self, envelope: &RtdsEnvelope) {\n        let payload: CryptoPayloadRaw = match serde_json::from_str(envelope.payload.get()) {\n            Ok(payload) => payload,\n            Err(e) => {\n                log::warn!(\"Failed to parse RTDS crypto price payload: {e}\");\n                return;","sourceCodeStart":1166,"sourceCodeEnd":1202,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/polymarket/src/rtds.rs#L1166-L1202","documentation":"The RTDS WebSocket delivered a message on a TWAP crypto price topic (crypto_prices_twap_thirty or crypto_prices_twap_sixty) with a message type the feed has no handler for. Because the topic is subscribed, silently ignoring it would mean silently missing data, so the feed bails. Other unknown topics are only logged at debug because they are not subscribed.","triggerScenarios":"Polymarket RTDS emits an event on a subscribed TWAP topic whose msg_type is not matched by any handler arm (e.g. a new message type added upstream), while has_topic_subscription(topic) is true.","commonSituations":"Polymarket adding a new message type on existing TWAP topics; adapter version lagging behind RTDS protocol changes; subscribing to TWAP topics with an adapter that lacks handlers for their update payloads.","solutions":["Upgrade the nautilus_polymarket adapter to a version that handles the reported topic/type combination.","Compare the logged topic and msg_type against the match arms in rtds.rs to confirm what is supported.","Stop subscribing to the unsupported TWAP topic until support exists.","Report the exact topic and type upstream so a handler can be added."],"exampleFix":"// before\n(topic @ (\"crypto_prices_twap_thirty\" | \"crypto_prices_twap_sixty\"), _) if self.has_topic_subscription(topic) => {\n    anyhow::bail!(\"unsupported subscribed RTDS message topic={topic} type={msg_type}\");\n}\n// after\n(topic @ (\"crypto_prices_twap_thirty\" | \"crypto_prices_twap_sixty\"), \"update\") => {\n    self.handle_crypto_twap_update(envelope)?;\n}\n(topic @ (\"crypto_prices_twap_thirty\" | \"crypto_prices_twap_sixty\"), msg_type)\n    if self.has_topic_subscription(topic) =>\n{\n    anyhow::bail!(\"unsupported subscribed RTDS message topic={topic} type={msg_type}\");\n}","handlingStrategy":"retry","validationCode":"const SUPPORTED_TOPICS: &[&str] = &[\n    \"market\", \"user\",\n    \"crypto_prices_twap_thirty\", \"crypto_prices_twap_sixty\",\n    \"equity_prices\",\n];\nif !SUPPORTED_TOPICS.contains(&topic) {\n    log::warn!(\"skipping subscription to unsupported topic {topic}\");\n}","typeGuard":"fn is_handled_twap_message(topic: &str, msg_type: &str) -> bool {\n    matches!((topic, msg_type), (\"crypto_prices_twap_thirty\" | \"crypto_prices_twap_sixty\", \"update\"))\n}","tryCatchPattern":"match feed.next_event().await {\n    Ok(ev) => handle(ev),\n    Err(e) if e.to_string().contains(\"unsupported subscribed RTDS message\") => {\n        log::warn!(\"venue added a new TWAP message type; upgrade adapter: {e}\");\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Keep the adapter up to date with Polymarket RTDS protocol changes.","Watch venue changelogs for new message types on TWAP topics.","Do not subscribe to TWAP topics unless your adapter version handles their updates.","Alert on this error — it means subscribed data is being lost, not ignored."],"tags":["websocket","protocol","unsupported-message","polymarket","rtds"],"backgroundTag":"unsupported-enum-value","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}