1pub use crate::workflow_registry::WorkflowRegistrationError;
4#[cfg(feature = "experimental")]
5use temporalio_client::PluginApplyError;
6pub use temporalio_sdk_core::WorkerValidationError;
7
8#[derive(Debug, thiserror::Error)]
12#[non_exhaustive]
13pub enum WorkerCreateError {
14 #[cfg(feature = "experimental")]
16 #[error(transparent)]
17 Plugin(#[from] PluginApplyError),
18 #[error("worker initialization failed: {0}")]
20 Initialization(#[source] anyhow::Error),
21}
22
23#[derive(Debug, thiserror::Error)]
25#[non_exhaustive]
26pub enum WorkerRunError {
27 #[error("worker validation failed: {0}")]
29 Validation(#[source] WorkerValidationError),
30 #[error("{message}")]
32 Fatal {
33 message: String,
35 #[source]
37 source: Box<dyn std::error::Error + Send + Sync + 'static>,
38 },
39}
40
41pub use temporalio_common::error::{
42 ActivityExecutionError, ApplicationErrorCategory, ApplicationFailure,
43 ChildWorkflowExecutionError, ChildWorkflowStartError, OutgoingActivityError, OutgoingError,
44 OutgoingWorkflowError, RetryState, TimeoutType, WorkflowSignalError,
45};