pub enum SolariError {
Auth {
status: u16,
message: String,
code: Option<String>,
},
Plan {
status: u16,
message: String,
code: Option<String>,
},
ConcurrencyLimit {
status: u16,
message: String,
code: Option<String>,
},
NoCapacity {
status: u16,
message: String,
code: Option<String>,
},
Gateway {
status: u16,
message: String,
code: Option<String>,
},
Action {
method: String,
message: String,
code: Option<String>,
},
Timeout {
method: String,
timeout_ms: u64,
},
Connection {
message: String,
},
Git {
message: String,
},
Other(String),
}Expand description
Every error raised by the SDK. Corresponds to the SolariError hierarchy in
the TypeScript reference (AuthError / PlanError / ConcurrencyLimitError /
NoCapacityError / GatewayError / ActionError / TimeoutError / ConnectionError).
Variants§
Auth
HTTP 401/403 — the API key was missing, malformed, or rejected.
Plan
HTTP 402 (or a plan_* body) — the plan does not allow this.
ConcurrencyLimit
HTTP 429 — the org is at its session cap. NOT retryable.
NoCapacity
HTTP 503 / body no_capacity — no host available (retryable).
Gateway
Any other non-2xx gateway response (incl. 404/405/409/501).
Action
A control-WS RPC replied {ok:false}.
Timeout
A call (or connect) did not complete within its timeout.
Connection
The control WebSocket is not open (never connected, or dropped).
Git
A git subcommand exited non-zero (message includes sub/exit/detail).
Other(String)
Anything else (bad response body, internal invariant).
Implementations§
Trait Implementations§
Source§impl Debug for SolariError
impl Debug for SolariError
Source§impl Display for SolariError
impl Display for SolariError
Source§impl Error for SolariError
impl Error for SolariError
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()