Skip to main content

stakpak_server/
error.rs

1use thiserror::Error;
2use uuid::Uuid;
3
4#[derive(Debug, Error, Clone, PartialEq, Eq)]
5pub enum SessionManagerError {
6    #[error("session is already running")]
7    SessionAlreadyRunning,
8
9    #[error("session is still starting")]
10    SessionStarting,
11
12    #[error("session is not running")]
13    SessionNotRunning,
14
15    #[error("run mismatch: active={active_run_id}, requested={requested_run_id}")]
16    RunMismatch {
17        active_run_id: Uuid,
18        requested_run_id: Uuid,
19    },
20
21    #[error("actor startup failed: {0}")]
22    ActorStartupFailed(String),
23
24    #[error("run command channel is closed")]
25    CommandChannelClosed,
26}