pub enum AppError {
Auth {
reason: String,
},
AccessDenied {
op: String,
resource: String,
},
NotFound {
resource: String,
},
Conflict {
etag_expected: String,
etag_actual: Option<String>,
},
RateLimited {
retry_after_ms: Option<u64>,
},
Unsupported {
op: String,
provider: String,
},
Network {
source: String,
},
Cancelled,
Locked {
lock_id: String,
op_name: String,
},
Validation {
field: String,
hint: String,
},
ProviderSpecific {
code: String,
message: String,
},
Internal {
trace_id: String,
},
}Expand description
All errors that can leave a Tauri command.
Serializes to { kind, message, retryable, details? }.
Variants§
Auth
Authentication failure. reason is "expired", "invalid", or "missing".
AccessDenied
Caller lacks permission for op on resource.
NotFound
The requested resource does not exist.
Conflict
ETag precondition failure.
RateLimited
AWS / provider rate-limit hit. retry_after_ms is the hint from the
Retry-After header when present.
Unsupported
The requested operation is not supported by this provider.
Network
Network-level failure. source is the stringified upstream error.
Cancelled
User-initiated cancellation. Not retryable.
Locked
A resource is held by an active lock.
Validation
Input validation failure.
ProviderSpecific
Provider-specific error not mappable to another variant.
Internal
Catch-all. trace_id ties this error to the diagnostics log bundle.
Implementations§
Trait Implementations§
Source§impl Error for AppError
impl Error for AppError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for AppError
impl RefUnwindSafe for AppError
impl Send for AppError
impl Sync for AppError
impl Unpin for AppError
impl UnsafeUnpin for AppError
impl UnwindSafe for AppError
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.