starweaver_session/
error.rs1use thiserror::Error;
4
5#[derive(Debug, Error)]
7pub enum SessionStoreError {
8 #[error("session record not found: {0}")]
10 NotFound(String),
11 #[error("session record already exists: {0}")]
13 AlreadyExists(String),
14 #[error("session store failed: {0}")]
16 Failed(String),
17}
18
19pub type SessionStoreResult<T> = Result<T, SessionStoreError>;
21
22impl From<SessionStoreError> for starweaver_context::AgentExecutorError {
23 fn from(error: SessionStoreError) -> Self {
24 Self::Failed(error.to_string())
25 }
26}