{"record":{"id":"956d69cc1e3e08e4","repo":"BigPizzaV3/CodexPlusPlus","slug":"session-id-cannot-be-empty","errorCode":null,"errorMessage":"session_id cannot be empty","messagePattern":"session_id cannot be empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/models.rs","lineNumber":14,"sourceCode":"#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]\npub struct SessionRef {\n    pub session_id: String,\n    pub title: String,\n}\n\nimpl SessionRef {\n    pub fn new(\n        session_id: impl Into<String>,\n        title: impl Into<String>,\n    ) -> anyhow::Result<SessionRef> {\n        let session_id = session_id.into();\n        if session_id.is_empty() {\n            anyhow::bail!(\"session_id cannot be empty\");\n        }\n\n        Ok(SessionRef {\n            session_id,\n            title: title.into(),\n        })\n    }\n}\n\n#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]\n#[serde(rename_all = \"snake_case\")]\npub enum DeleteStatus {\n    ServerDeleted,\n    LocalDeleted,\n    Partial,\n    Failed,\n    Undone,\n}","sourceCodeStart":1,"sourceCodeEnd":32,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/f2074595a281bc057525c748175c8eb9805b0673/crates/codex-plus-core/src/models.rs#L1-L32","documentation":"Thrown by SessionRef::new when the provided session_id string is empty. SessionRef is the universal session handle passed across the bridge/data layer, so the constructor refuses to mint an un-addressable reference; the offending input is the caller-supplied session_id (empty string/blank).","triggerScenarios":"Thrown at crates/codex-plus-core/src/models.rs:14 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["传入非空的会话 id","调用前先过滤空 session_id"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f2074595a281bc057525c748175c8eb9805b0673","analyzedAt":"2026-08-23T12:52:24.489Z","contentChangedAt":"2026-08-23T12:52:24.489Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}