awaken_runtime/error.rs
1use awaken_contract::StateError;
2use thiserror::Error;
3
4/// Runtime-specific errors that wrap [`StateError`] and add variants
5/// for agent resolution and run management.
6#[derive(Debug, Error, Clone, PartialEq, Eq)]
7pub enum RuntimeError {
8 #[error(transparent)]
9 State(#[from] StateError),
10 #[error("thread already has an active run: {thread_id}")]
11 ThreadAlreadyRunning { thread_id: String },
12 #[error("agent not found: {agent_id}")]
13 AgentNotFound { agent_id: String },
14 #[error("resolve failed: {message}")]
15 ResolveFailed { message: String },
16}