pub enum Error {
BinaryNotFound {
searched: Vec<String>,
},
CommandFailed {
exit_code: i32,
stdout: String,
stderr: String,
command: String,
},
SandboxNotFound {
id: String,
},
GraphQL {
message: String,
code: Option<String>,
},
Auth {
message: String,
},
InvalidInput(String),
Io(Error),
Json(Error),
}Expand description
Every error the SDK raises.
Variants§
BinaryNotFound
The bsdkrun binary could not be located on the host.
CommandFailed
A bsdkrun invocation (or a guest command run through it) exited
non-zero.
Fields
SandboxNotFound
No machine matched the given id / prefix.
GraphQL
A GraphQL- or transport-level failure talking to a remote bsdkrund.
code carries the response’s extensions.code when the daemon set one
(e.g. "INVALID_ARGUMENT", "FAILED"); it is None for a transport
failure (the daemon was unreachable) or a malformed response.
Auth
The daemon rejected the bearer token: an HTTP 401, a GraphQL error with
extensions.code == "UNAUTHENTICATED", or the WebSocket closing before
connection_ack was ever received.
InvalidInput(String)
An option combination the SDK refuses before running anything — a missing required builder field, a URL configured without a token.
Io(Error)
A host-side I/O failure spawning or driving the bsdkrun process.
Json(Error)
Output that should have been JSON was not.
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()