#[non_exhaustive]pub enum SessionError {
NotFound(SessionId),
AgentError(String),
Timeout(Duration),
SendWhileWaiting,
EventLoopClosed,
ElicitationNotSupported,
SessionFsProviderRequired,
InvalidSessionFsConfig(String),
}Expand description
Session-scoped errors.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotFound(SessionId)
The CLI could not find the requested session.
AgentError(String)
The CLI reported an error during agent execution (via session.error event).
Timeout(Duration)
A send_and_wait call exceeded its timeout.
SendWhileWaiting
send was called while a send_and_wait is in flight.
EventLoopClosed
The session event loop exited before a pending send_and_wait completed.
ElicitationNotSupported
Elicitation is not supported by the host.
Check session.capabilities().ui.elicitation before calling UI methods.
SessionFsProviderRequired
The client was started with ClientOptions::session_fs but this
session was created without a SessionFsProvider. Set one via
SessionConfig::with_session_fs_provider (or
ResumeSessionConfig::with_session_fs_provider).
InvalidSessionFsConfig(String)
ClientOptions::session_fs was provided with empty or invalid
fields. All of initial_cwd and session_state_path must be
non-empty.
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()