{"record":{"id":"2ea34eb21dce0168","repo":"nautechsystems/nautilus_trader","slug":"dbn-message-type-is-not-currently-supported-2ea34e","errorCode":null,"errorMessage":"DBN message type is not currently supported","messagePattern":"DBN message type is not currently supported","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/databento/src/symbology.rs","lineNumber":139,"sourceCode":"        (msg.hd.instrument_id, msg.ts_recv)\n    } else if let Some(msg) = record.get::<dbn::OhlcvMsg>() {\n        (msg.hd.instrument_id, msg.hd.ts_event)\n    } else if let Some(msg) = record.get::<dbn::StatusMsg>() {\n        (msg.hd.instrument_id, msg.ts_recv)\n    } else if let Some(msg) = record.get::<dbn::ImbalanceMsg>() {\n        (msg.hd.instrument_id, msg.ts_recv)\n    } else if let Some(msg) = record.get::<dbn::StatMsg>() {\n        (msg.hd.instrument_id, msg.ts_recv)\n    } else if let Some(msg) = record.get::<dbn::InstrumentDefMsg>() {\n        (msg.hd.instrument_id, msg.ts_recv)\n    } else if let Some(msg) = record.get::<dbn::Cmbp1Msg>() {\n        (msg.hd.instrument_id, msg.ts_recv)\n    } else if let Some(msg) = record.get::<dbn::CbboMsg>() {\n        (msg.hd.instrument_id, msg.ts_recv)\n    } else if let Some(msg) = record.get::<dbn::TbboMsg>() {\n        (msg.hd.instrument_id, msg.ts_recv)\n    } else {\n        anyhow::bail!(\"DBN message type is not currently supported\")\n    };\n\n    let duration = time::Duration::nanoseconds(nanoseconds as i64);\n    let datetime = time::OffsetDateTime::UNIX_EPOCH\n        .checked_add(duration)\n        .ok_or_else(|| anyhow::anyhow!(\"Timestamp overflow for record\"))?;\n    let date = datetime.date();\n    let symbol_map = metadata.symbol_map_for_date(date)?;\n    let raw_symbol = symbol_map\n        .get(instrument_id)\n        .ok_or_else(|| anyhow::anyhow!(\"No raw symbol found for {instrument_id}\"))?;\n\n    let symbol = Symbol::from_str_unchecked(raw_symbol);\n\n    Ok(InstrumentId::new(symbol, venue))\n}\n\n#[must_use]","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/databento/src/symbology.rs#L121-L157","documentation":"get_nautilus_instrument_id_for_record only handles a fixed set of DBN message types (e.g. TradeMsg, Mbp1Msg, CbboMsg, TbboMsg etc.). If the record is a DBN schema the adapter does not match, it fails with this error instead of extracting the instrument id.","triggerScenarios":"Decoding a Databento subscription whose schema (e.g. definition, statistics, imbalance) is not in the supported match chain of record.get::<T>() calls.","commonSituations":"Subscribing to new/uncommon Databento schemas without updating adapter support; passing raw records from a multi-schema subscription through instrument-id decoding.","solutions":["Only subscribe to schemas supported by the adapter, or filter records before decoding","Update the match chain to handle the new DBN message type","Check the Databento schema list against the adapter's supported types"],"exampleFix":"// before\n} else {\n    anyhow::bail!(\"DBN message type is not currently supported\")\n};\n// after\n} else if let Some(msg) = record.get::<dbn::StatMsg>() {\n    (msg.hd.instrument_id, msg.ts_recv)\n} else {\n    log::debug!(\"Unsupported DBN message type, skipping\");\n    return Ok(None);\n};","handlingStrategy":"type-guard","validationCode":"// only request schemas the adapter supports\nconst SUPPORTED: &[dbn::Schema] = &[dbn::Schema::Trades, dbn::Schema::Mbp1, ...];\nassert!(SUPPORTED.contains(&schema));","typeGuard":"fn is_supported_record(r: &dbn::RecordRef) -> bool {\n    r.get::<dbn::TradeMsg>().is_some()\n        || r.get::<dbn::Mbp1Msg>().is_some()\n        || r.get::<dbn::CbboMsg>().is_some()\n        || r.get::<dbn::TbboMsg>().is_some()\n}","tryCatchPattern":"match decode_nautilus_instrument_id(record) {\n    Ok(id) => ..., \n    Err(e) if e.to_string().contains(\"not currently supported\") => {\n        log::debug!(\"skipping unsupported record\");\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Subscribe only to adapter-supported Databento schemas","Filter or route unsupported records before decoding","Track Databento schema additions vs adapter support"],"tags":["databento","unsupported-type","decoding","schema"],"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"}