{"record":{"id":"ce7037d4e67f4d8d","repo":"BigPizzaV3/CodexPlusPlus","slug":"session-file-import-is-unavailable","errorCode":null,"errorMessage":"Session file import is unavailable","messagePattern":"Session file import is unavailable","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/routes.rs","lineNumber":126,"sourceCode":"\n#[async_trait]\npub trait BridgeDataService: Send + Sync {\n    async fn delete(&self, session: SessionRef) -> anyhow::Result<DeleteResult>;\n    async fn undo(&self, undo_token: String) -> anyhow::Result<DeleteResult>;\n    async fn export_markdown(&self, session: SessionRef) -> anyhow::Result<ExportResult>;\n    async fn thread_usage_history(&self, session: SessionRef) -> anyhow::Result<Value>;\n    async fn find_archived_thread_by_title(\n        &self,\n        title: String,\n    ) -> anyhow::Result<Option<SessionRef>>;\n    async fn recover_remote_control_session(&self, _thread_id: String) -> anyhow::Result<Value> {\n        anyhow::bail!(\"Remote Control session recovery is unavailable\")\n    }\n    async fn export_session_file(&self, _session: SessionRef) -> anyhow::Result<Value> {\n        anyhow::bail!(\"Session file export is unavailable\")\n    }\n    async fn import_session_file(&self, _payload: Value) -> anyhow::Result<Value> {\n        anyhow::bail!(\"Session file import is unavailable\")\n    }\n}\n\npub async fn handle_bridge_request(\n    ctx: BridgeContext,\n    path: &str,\n    payload: Value,\n) -> serde_json::Value {\n    let started = Instant::now();\n    let _ = crate::diagnostic_log::append_diagnostic_log(\n        \"bridge.request\",\n        json!({\n            \"path\": path,\n            \"payload_keys\": payload\n                .as_object()\n                .map(|object| object.keys().cloned().collect::<Vec<_>>())\n                .unwrap_or_default()\n        }),","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/f2074595a281bc057525c748175c8eb9805b0673/crates/codex-plus-core/src/routes.rs#L108-L144","documentation":"Sentinel thrown by the default BridgeDataService implementation of the session-file import route (trait fallback in routes.rs). A bridge wiring without a real data service cannot write imported sessions, so the route reports itself unavailable instead of pretending to import; the trigger is calling session import through such a bridge context.","triggerScenarios":"Thrown at crates/codex-plus-core/src/routes.rs:126 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["使用支持导入的数据服务实现","改用其他导入路径"],"exampleFix":null,"handlingStrategy":"fallback","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-14T05:17:10.506Z"}