{"record":{"id":"1e26783477b5d619","repo":"DioxusLabs/dioxus","slug":"failed-to-deserialize-message","errorCode":null,"errorMessage":"Failed to deserialize message","messagePattern":"Failed to deserialize message","errorType":"exception","errorClass":"WebsocketError","httpStatus":null,"severity":"error","filePath":"packages/fullstack/src/payloads/websocket.rs","lineNumber":934,"sourceCode":"                code: close_event.code.into(),\n                description: close_event.reason,\n            },\n            WebSocketError::MessageSendError(_js_error) => WebsocketError::Unexpected,\n            _ => WebsocketError::Unexpected,\n        }\n    }\n}\n\nimpl WebsocketError {\n    pub fn closed_away() -> Self {\n        Self::ConnectionClosed {\n            code: CloseCode::Normal,\n            description: \"Connection closed normally\".into(),\n        }\n    }\n\n    pub fn deserialization() -> Self {\n        Self::Deserialization(anyhow::anyhow!(\"Failed to deserialize message\").into())\n    }\n\n    pub fn serialization() -> Self {\n        Self::Serialization(anyhow::anyhow!(\"Failed to serialize message\").into())\n    }\n}\n\n#[cfg(feature = \"web\")]\nstruct WebsysSocket {\n    sender: Mutex<SplitSink<WsWebsocket, WsMessage>>,\n    receiver: Mutex<SplitStream<WsWebsocket>>,\n}\n\n/// A `WebSocket` message, which can be a text string or binary data.\n#[derive(Clone, Debug)]\npub enum Message {\n    /// A text `WebSocket` message.\n    // note: we can't use `tungstenite::Utf8String` here, since we don't have tungstenite on wasm.","sourceCodeStart":916,"sourceCodeEnd":952,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/fullstack/src/payloads/websocket.rs#L916-L952","documentation":"Constructs the Deserialization variant of WebsocketError: an incoming websocket message body could not be decoded by the Encoding's from_bytes (client side). Used where deserialization of a received frame fails; the raw frame was received but its payload does not match the expected In type.","triggerScenarios":"Thrown at packages/fullstack/src/payloads/websocket.rs:934 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The websocket message could not be deserialized. Match the client and server message types and versions."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}