Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(notifications): match exact cron job not found error

Steven Enamakel213e159eeec1
diff --git a/crates/openhuman-core/src/desktop/notifications/bus.rs b/crates/openhuman-core/src/desktop/notifications/bus.rs
index 7b80b1168f..54e6318d4c 100644
--- a/crates/openhuman-core/src/desktop/notifications/bus.rs
+++ b/crates/openhuman-core/src/desktop/notifications/bus.rs
@@ -495,7 +495,12 @@ async fn event_owner(
let owner = crate::storage::agents::find_owner("notification owner", || async {
match crate::cron::get_job(config, job_id) {
Ok(_) => Ok(true),
- Err(error) if error.to_string().contains("not found") => Ok(false),
+ // tinyflows reports a missing job as `Cron job '<id>' not found`
+ // (an untyped `anyhow` error in the vendored crate); match that
+ // whole shape for this job rather than any message mentioning it.
+ Err(error) if error.to_string() == format!("Cron job '{job_id}' not found") => {
+ Ok(false)
+ }
Err(error) => Err(error.to_string()),
}
})