{"record":{"id":"02c7620e88209d5f","repo":"Hmbown/CodeWhale","slug":"trigger-trigger-id-not-found","errorCode":null,"errorMessage":"Trigger '{trigger_id}' not found","messagePattern":"Trigger '(.+?)' not found","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/automation_manager.rs","lineNumber":1919,"sourceCode":"                CURRENT_TRIGGER_SCHEMA_VERSION\n            );\n        }\n        Ok(record)\n    }\n\n    /// Load a trigger only when it belongs to the given session.\n    ///\n    /// Foreign, ownerless legacy, unreadable, and absent records share the same\n    /// result so trigger existence cannot be disclosed across sessions.\n    pub fn get_trigger_for_owner(\n        &self,\n        trigger_id: &str,\n        owner_session_id: &str,\n    ) -> Result<DelayedTriggerRecord> {\n        self.get_trigger(trigger_id)\n            .ok()\n            .filter(|record| record.owner_session_id.as_deref() == Some(owner_session_id))\n            .ok_or_else(|| anyhow::anyhow!(\"Trigger '{trigger_id}' not found\"))\n    }\n\n    /// Atomically persist a trigger record.\n    pub fn save_trigger(&self, record: &DelayedTriggerRecord) -> Result<()> {\n        self.with_transaction(|| self.save_trigger_unlocked(record))\n    }\n\n    fn save_trigger_unlocked(&self, record: &DelayedTriggerRecord) -> Result<()> {\n        let path = self.trigger_path(&record.trigger_id)?;\n        write_json_atomic(&path, record)\n    }\n\n    /// List triggers, newest first.  Pass `status_filter` to restrict results.\n    pub fn list_triggers(\n        &self,\n        status_filter: Option<DelayedTriggerStatus>,\n        limit: Option<usize>,\n    ) -> Result<Vec<DelayedTriggerRecord>> {","sourceCodeStart":1901,"sourceCodeEnd":1937,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/automation_manager.rs#L1901-L1937","documentation":"get_trigger_for_owner deliberately collapses every failure — absent record, foreign owner, ownerless legacy record, unreadable file — into this single 'not found' result so trigger existence cannot be disclosed across sessions; callers cannot distinguish the causes by design.","triggerScenarios":"Thrown at crates/tui/src/automation_manager.rs:1919 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use get_trigger with the correct trigger id (from create_trigger's return or list_triggers).","Check for typos; the file for that id does not exist under the triggers directory."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}