{"record":{"id":"fcd26057bf46ed93","repo":"nautechsystems/nautilus_trader","slug":"unsupported-sbe-order-side-side","errorCode":null,"errorMessage":"Unsupported SBE order side: {side}","messagePattern":"Unsupported SBE order side: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crates/adapters/binance/src/spot/websocket/trading/decode_sbe.rs","lineNumber":425,"sourceCode":"fn map_order_status(os: order_status::OrderStatus) -> BinanceOrderStatus {\n    match os {\n        order_status::OrderStatus::New => BinanceOrderStatus::New,\n        order_status::OrderStatus::PartiallyFilled => BinanceOrderStatus::PartiallyFilled,\n        order_status::OrderStatus::Filled => BinanceOrderStatus::Filled,\n        order_status::OrderStatus::Canceled => BinanceOrderStatus::Canceled,\n        order_status::OrderStatus::PendingCancel => BinanceOrderStatus::PendingCancel,\n        order_status::OrderStatus::Rejected => BinanceOrderStatus::Rejected,\n        order_status::OrderStatus::Expired => BinanceOrderStatus::Expired,\n        order_status::OrderStatus::ExpiredInMatch => BinanceOrderStatus::ExpiredInMatch,\n        _ => BinanceOrderStatus::Unknown,\n    }\n}\n\nfn map_side(side: order_side::OrderSide) -> anyhow::Result<BinanceSide> {\n    match side {\n        order_side::OrderSide::Buy => Ok(BinanceSide::Buy),\n        order_side::OrderSide::Sell => Ok(BinanceSide::Sell),\n        _ => anyhow::bail!(\"Unsupported SBE order side: {side}\"),\n    }\n}\n\nfn map_time_in_force(tif: time_in_force::TimeInForce) -> BinanceTimeInForce {\n    match tif {\n        time_in_force::TimeInForce::Gtc => BinanceTimeInForce::Gtc,\n        time_in_force::TimeInForce::Ioc => BinanceTimeInForce::Ioc,\n        time_in_force::TimeInForce::Fok => BinanceTimeInForce::Fok,\n        _ => BinanceTimeInForce::Unknown,\n    }\n}\n\nfn map_order_type(ot: order_type::OrderType) -> &'static str {\n    match ot {\n        order_type::OrderType::Market => \"MARKET\",\n        order_type::OrderType::Limit => \"LIMIT\",\n        order_type::OrderType::StopLoss => \"STOP_LOSS\",\n        order_type::OrderType::StopLossLimit => \"STOP_LOSS_LIMIT\",","sourceCodeStart":407,"sourceCodeEnd":443,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/binance/src/spot/websocket/trading/decode_sbe.rs#L407-L443","documentation":"map_side converts the SBE order-side enum into the crate's BinanceSide and bails on any variant other than Buy or Sell. The decoded payload carried an order side the adapter does not model — typically the SBE NULL_VALUE sentinel or a variant added by a schema update.","triggerScenarios":"Decoding an execution report whose order_side field is the SBE enum's NULL_VALUE/default, or contains a new side variant absent from the generated order_side::OrderSide enum match.","commonSituations":"Message types where side is not applicable (e.g. cancel acknowledgments) decode with a null side; stale generated codecs after a Binance schema change; zeroed test fixtures.","solutions":["Update codecs/adapter to map any newly added side variant","Handle NULL_VALUE by treating it as Unknown or skipping the message upstream","Check which message type was decoded — if side is genuinely absent, decode with the correct type","Log the raw discriminant to confirm it is the null sentinel"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match decode_execution_report(&payload) {\n    Err(e) if e.to_string().starts_with(\"Unsupported SBE order side\") => {\n        log::debug!(\"null/unknown order side; skipping\");\n    }\n    other => other?,\n}","preventionTips":["Expect NULL_VALUE sides on messages where side is not applicable","Regenerate enums when the schema adds variants","Log the raw discriminant before failing","Route messages to the decoder matching their actual template ID"],"tags":["rust","sbe","enum","forward-compatibility"],"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"}