diff --git a/host/src/proof.rs b/host/src/proof.rs index 46ade302..14824d94 100644 --- a/host/src/proof.rs +++ b/host/src/proof.rs @@ -63,7 +63,15 @@ impl ProofActor { (key.chain_id, key.blockhash, key.proof_system as u8), Box::new(&mut manager), ) - .await?; + .await + .or_else(|e| { + if e.to_string().contains("no id found") { + warn!("Task already cancelled or not yet started!"); + Ok(()) + } else { + Err::<(), HostError>(e.into()) + } + })?; task.cancel(); Ok(()) } diff --git a/host/src/server/api/v2/mod.rs b/host/src/server/api/v2/mod.rs index fe8003bc..0cd5ae12 100644 --- a/host/src/server/api/v2/mod.rs +++ b/host/src/server/api/v2/mod.rs @@ -39,6 +39,7 @@ mod proof; TaskStatus, CancelStatus, PruneStatus, + Proof, Status, ) ),