{"record":{"id":"5e50ec2559b7e7ff","repo":"zellij-org/zellij","slug":"invalid-exit-reason","errorCode":null,"errorMessage":"Invalid exit_reason","messagePattern":"Invalid exit_reason","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"zellij-utils/src/ipc/protobuf_conversion.rs","lineNumber":603,"sourceCode":"                active_pane_is_fullscreen: false,\n            }),\n    }\n}\n\n// Convert protobuf ServerToClientMsg to Rust\nimpl TryFrom<ProtoServerToClientMsg> for ServerToClientMsg {\n    type Error = anyhow::Error;\n\n    fn try_from(msg: ProtoServerToClientMsg) -> Result<Self> {\n        match msg.message {\n            Some(server_to_client_msg::Message::Render(render)) => Ok(ServerToClientMsg::Render {\n                content: render.content,\n            }),\n            Some(server_to_client_msg::Message::UnblockInputThread(_)) => {\n                Ok(ServerToClientMsg::UnblockInputThread)\n            },\n            Some(server_to_client_msg::Message::Exit(exit)) => {\n                let proto_exit_reason = ProtoExitReason::try_from(exit.exit_reason)\n                    .ok()\n                    .ok_or_else(|| anyhow!(\"Invalid exit_reason\"))?;\n\n                let exit_reason = match proto_exit_reason {\n                    ProtoExitReason::Error => {\n                        let error_msg =\n                            exit.payload.unwrap_or_else(|| \"Protobuf error\".to_string());\n                        ExitReason::Error(error_msg)\n                    },\n                    ProtoExitReason::CustomExitStatus => {\n                        let status_str = exit.payload.unwrap_or_else(|| \"0\".to_string());\n                        let status = status_str\n                            .parse::<i32>()\n                            .map_err(|_| anyhow!(\"Invalid custom exit status: {}\", status_str))?;\n                        ExitReason::CustomExitStatus(status)\n                    },\n                    other => other.try_into()?,\n                };","sourceCodeStart":585,"sourceCodeEnd":621,"githubUrl":"https://github.com/zellij-org/zellij/blob/e839bfffa586992364309a685b2c71f3b23c247e/zellij-utils/src/ipc/protobuf_conversion.rs#L585-L621","documentation":"Error \"Invalid exit_reason\" thrown in zellij-org/zellij.","triggerScenarios":"Occurs when a protobuf enum value received over IPC has no matching variant; conversion rejects the unknown value.","commonSituations":"Typical of version skew between client and server, or a malformed/corrupted IPC message.","solutions":["Validate the value against the allowed enum range before constructing the message.","Ensure client and server use matching protobuf definitions; regenerate bindings if versions differ."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e839bfffa586992364309a685b2c71f3b23c247e","analyzedAt":"2026-08-19T07:42:58.758Z","contentChangedAt":"2026-08-19T07:42:58.758Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}