#[non_exhaustive]pub enum SailError {
Show 15 variants
Config {
message: String,
},
Internal {
message: String,
},
Transport {
kind: TransportKind,
message: String,
source: Option<Box<dyn StdError + Send + Sync + 'static>>,
},
Creation {
message: String,
status: u16,
body: Value,
},
NotFound {
message: String,
},
PermissionDenied {
message: String,
},
FileNotFound {
message: String,
},
InvalidArgument {
message: String,
},
ImageBuild {
message: String,
},
Api {
status: u16,
message: String,
body: Value,
},
ExecRequestNotFound {
message: String,
},
Terminated {
message: String,
},
WorkerLost {
message: String,
},
BrokenPipe {
message: String,
},
Execution {
code: GrpcCode,
detail: String,
},
}Expand description
The canonical Sail error. Variants carry structured fields so bindings can populate their own exception attributes without parsing strings.
Display is for Rust logs only; bindings format their own user-facing text.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Config
Configuration/usage error (e.g. a missing API key).
Internal
Unexpected internal failure (client build, TLS config, invariant).
Transport
HTTP/gRPC dial-time transport failure. source is the underlying
transport error (e.g. the originating tonic::Status) for Rust callers.
Fields
kind: TransportKindWhether the transport failed by timeout or by connection error.
Creation
Sailbox creation failed (non-2xx on create).
Fields
NotFound
A resource was not found (404 on get / unknown id across orgs).
PermissionDenied
A credential problem: missing/invalid API key or insufficient scope.
FileNotFound
A file operation referenced a path that does not exist.
InvalidArgument
A request argument was rejected as invalid.
ImageBuild
A custom image build failed (the build reported failed).
Api
Any other non-2xx API response.
Fields
ExecRequestNotFound
A wait referenced an unknown exec request.
Terminated
The sailbox no longer exists on the worker.
WorkerLost
The worker hosting the sailbox was lost; output is unrecoverable.
BrokenPipe
A stdin write hit a command that already finished or closed its stdin.
Execution
Any other exec-RPC failure, classified by gRPC code.
Trait Implementations§
Source§impl Error for SailError
impl Error for SailError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for SailError
impl !UnwindSafe for SailError
impl Freeze for SailError
impl Send for SailError
impl Sync for SailError
impl Unpin for SailError
impl UnsafeUnpin for SailError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request