diff --git a/apis/python/node/src/lib.rs b/apis/python/node/src/lib.rs index d50069c6..168c2ea7 100644 --- a/apis/python/node/src/lib.rs +++ b/apis/python/node/src/lib.rs @@ -104,10 +104,7 @@ impl Node { #[pyfunction] fn start_runtime() -> Result<()> { - dora_runtime::main() - .wrap_err("Python Dora Runtime failed.") - .unwrap(); - Ok(()) + dora_runtime::main().wrap_err("Dora Runtime raised an error.") } #[pymodule] diff --git a/binaries/runtime/src/lib.rs b/binaries/runtime/src/lib.rs index afbe84e4..c612465c 100644 --- a/binaries/runtime/src/lib.rs +++ b/binaries/runtime/src/lib.rs @@ -136,7 +136,10 @@ async fn run( } => { match event { OperatorEvent::Error(err) => { - bail!(err.wrap_err(format!("operator {operator_id} failed"))) + bail!(err.wrap_err(format!( + "operator {}/{operator_id} raised an error", + node.id() + ))) } OperatorEvent::Panic(payload) => { bail!("operator {operator_id} panicked: {payload:?}"); diff --git a/binaries/runtime/src/operator/python.rs b/binaries/runtime/src/operator/python.rs index 0a7a3171..ecdc74f2 100644 --- a/binaries/runtime/src/operator/python.rs +++ b/binaries/runtime/src/operator/python.rs @@ -19,7 +19,7 @@ use tokio::sync::mpsc::Sender; fn traceback(err: pyo3::PyErr) -> eyre::Report { let traceback = Python::with_gil(|py| err.traceback(py).and_then(|t| t.format().ok())); if let Some(traceback) = traceback { - eyre::eyre!("{err}:\n{traceback}") + eyre::eyre!("{err}{traceback}") } else { eyre::eyre!("{err}") }