pub enum SessionError {
NotFound(Uuid),
Expired(Uuid),
BudgetExceeded {
session_id: Uuid,
limit: u64,
used: u64,
},
ToolNotAuthorized {
session_id: Uuid,
tool: String,
},
AlreadyClosed(Uuid),
RateLimited {
session_id: Uuid,
limit_per_minute: u64,
},
TooManySessions {
agent_id: String,
max: u64,
current: u64,
},
}Expand description
Errors from session operations.
Display impls are intentionally opaque — they appear in HTTP error responses sent to agents. Internal fields are preserved for structured logging via Debug. Previously, Display exposed budget limits, rate limit values, tool names, and session caps to untrusted agents.
Variants§
NotFound(Uuid)
The referenced session does not exist.
Expired(Uuid)
The session has expired (time limit exceeded).
BudgetExceeded
The session’s call budget has been exhausted.
ToolNotAuthorized
The requested tool is not in the session’s authorized set.
AlreadyClosed(Uuid)
The session has already been closed.
RateLimited
The session’s per-minute rate limit has been exceeded.
TooManySessions
The agent has reached the maximum number of concurrent active sessions.
P0: Per-agent session cap to prevent session multiplication attacks.
Trait Implementations§
Source§impl Debug for SessionError
impl Debug for SessionError
Source§impl Display for SessionError
impl Display for SessionError
Source§impl Error for SessionError
impl Error for SessionError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()