1use crate::agent::{AgentResultError, ContextError};
2
3use crate::agent::error::{AgentBuildError, RunnableAgentError};
4#[cfg(not(target_arch = "wasm32"))]
5use crate::{environment::EnvironmentError, runtime::RuntimeError};
6use autoagents_llm::error::LLMError;
7
8#[derive(Debug, thiserror::Error)]
9pub enum Error {
10 #[cfg(not(target_arch = "wasm32"))]
11 #[error(transparent)]
12 EnvironmentError(#[from] EnvironmentError),
13 #[cfg(not(target_arch = "wasm32"))]
14 #[error(transparent)]
15 RuntimeError(#[from] RuntimeError),
16 #[error(transparent)]
17 AgentBuildError(#[from] AgentBuildError),
18 #[error(transparent)]
19 RunnableAgentError(#[from] RunnableAgentError),
20 #[error(transparent)]
21 LLMError(#[from] LLMError),
22 #[error(transparent)]
23 AgentResultError(#[from] AgentResultError),
24 #[error(transparent)]
25 ContextError(#[from] ContextError),
26 #[error("Custom Error: {0}")]
27 CustomError(String),
28}