{"record":{"id":"54d4bffa648b4ff3","repo":"Hmbown/CodeWhale","slug":"trigger-message-must-not-be-empty","errorCode":null,"errorMessage":"Trigger message must not be empty","messagePattern":"Trigger message must not be empty","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/automation_manager.rs","lineNumber":1867,"sourceCode":"            }\n        }\n        Ok(pending)\n    }\n\n    // ── Delayed-trigger storage methods ──────────────────────────────────\n\n    /// Persist a new delayed trigger and return the record.\n    pub fn create_trigger(&self, req: CreateDelayedTriggerRequest) -> Result<DelayedTriggerRecord> {\n        let now = Utc::now();\n        if req.fire_at <= now {\n            bail!(\n                \"fire_at must be in the future (got {}, now is {})\",\n                req.fire_at.to_rfc3339(),\n                now.to_rfc3339()\n            );\n        }\n        if req.message.trim().is_empty() {\n            bail!(\"Trigger message must not be empty\");\n        }\n        let record = DelayedTriggerRecord {\n            schema_version: CURRENT_TRIGGER_SCHEMA_VERSION,\n            execution_scope: self.execution_scope.clone(),\n            trigger_id: format!(\"trig_{}\", Uuid::new_v4().simple()),\n            fire_at: req.fire_at,\n            message: req.message.trim().to_string(),\n            workspace: req.workspace,\n            owner_session_id: req.owner_session_id,\n            status: DelayedTriggerStatus::Pending,\n            created_at: now,\n            fired_at: None,\n            task_id: None,\n            thread_id: None,\n            error: None,\n            parent_trigger_id: req.parent_trigger_id,\n            dispatch: None,\n        };","sourceCodeStart":1849,"sourceCodeEnd":1885,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/automation_manager.rs#L1849-L1885","documentation":"Create-trigger guard in create_trigger: after the future-time check on fire_at, the request's message must contain at least one non-whitespace character. A trigger whose message trims to empty is rejected before the record is persisted.","triggerScenarios":"Thrown at crates/tui/src/automation_manager.rs:1867 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send a message with non-whitespace content describing the delayed action.","Validate user input for emptiness before building the CreateDelayedTriggerRequest."],"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"}