{"record":{"id":"81d6369ac80eec29","repo":"nautechsystems/nautilus_trader","slug":"error-decoding-stype-out-symbol-e","errorCode":null,"errorMessage":"Error decoding `stype_out_symbol`: {e}","messagePattern":"Error decoding `stype_out_symbol`: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/databento/src/live.rs","lineNumber":1050,"sourceCode":"}\n\nfn update_price_precision_map_with_symbol_mapping_msg(\n    msg: &dbn::SymbolMappingMsg,\n    price_precision_overrides: &AHashMap<Symbol, u8>,\n    subscription_price_precision_map: &mut AHashMap<u32, u8>,\n) -> anyhow::Result<()> {\n    subscription_price_precision_map.remove(&msg.hd.instrument_id);\n\n    if price_precision_overrides.is_empty() {\n        return Ok(());\n    }\n\n    let stype_in_symbol = msg\n        .stype_in_symbol()\n        .map_err(|e| anyhow::anyhow!(\"Error decoding `stype_in_symbol`: {e}\"))?;\n    let stype_out_symbol = msg\n        .stype_out_symbol()\n        .map_err(|e| anyhow::anyhow!(\"Error decoding `stype_out_symbol`: {e}\"))?;\n\n    let price_precision = [stype_in_symbol, stype_out_symbol]\n        .into_iter()\n        .find_map(|symbol| {\n            price_precision_overrides\n                .get(&Symbol::from_str_unchecked(symbol))\n                .copied()\n        });\n\n    if let Some(price_precision) = price_precision {\n        subscription_price_precision_map.insert(msg.hd.instrument_id, price_precision);\n    }\n\n    Ok(())\n}\n\n/// Updates the instrument ID map using exchange information from the symbol map.\nfn update_instrument_id_map_with_exchange(","sourceCodeStart":1032,"sourceCodeEnd":1068,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/databento/src/live.rs#L1032-L1068","documentation":"Same family as the stype_in error, but for the `stype_out` symbol of a Databento SymbolMappingMsg: the outbound (resolved) symbol bytes in the record cannot be decoded to a valid string. The adapter aborts the price-precision-map update for this mapping message.","triggerScenarios":"A SymbolMappingMsg arrives during run_session with non-empty `price_precision_overrides`, and `stype_out_symbol()` fails to decode the record's symbol bytes (invalid UTF-8/corrupt length field).","commonSituations":"Corrupt or truncated live/replay DBN data, version mismatch between the dbn decoder crate used by the adapter and the producer format, or altered records from a custom proxy.","solutions":["Ensure the `databento-dbn` dependency version matches the format emitted by the Databento gateway; upgrade the adapter and rebuild","Reconnect and verify whether the error is transient; if persistent, report the malformed record to Databento","Pass empty `price_precision_overrides` if precision lookup via symbol-mapping is unnecessary, bypassing this decode path","Handle the error per-record (log and continue) instead of propagating it through run_session"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match result {\n    Ok(()) => {},\n    Err(e) if e.to_string().contains(\"stype_out_symbol\") => log::warn!(\"skipping mapping msg: {e}\"),\n    Err(e) => return Err(e),\n}","preventionTips":["Pin matching databento-dbn versions across your workspace","Avoid replaying truncated recordings","Report persistent malformed records to Databento support"],"tags":["databento","decoding","live-stream","utf-8"],"backgroundTag":"json-decode-failed","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"}