pub enum BosonError {
TaskNotFound(String),
JobNotFound(String),
RunNotFound(String),
TaskConfigNotFound(String),
ParamError(String),
SignatureMismatch {
expected: String,
actual: String,
},
InvalidConfig(String),
Backend {
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
Internal {
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
RateLimited(String),
UnknownBackend(String),
}Expand description
Errors that can occur in Boson operations.
Variants§
TaskNotFound(String)
Task not found in registry.
JobNotFound(String)
Job not found.
RunNotFound(String)
Run not found.
TaskConfigNotFound(String)
Task config not found.
ParamError(String)
Parameter serialization/deserialization error.
SignatureMismatch
Signature mismatch between job and current task.
Fields
InvalidConfig(String)
Invalid priority or pool.
Backend
Persistence / adapter backend failure.
Fields
Internal
Internal error.
Fields
RateLimited(String)
Enqueue blocked by rate limit or in-flight cap; caller should retry after backoff.
UnknownBackend(String)
Named queue backend not registered on the router.
Implementations§
Source§impl BosonError
impl BosonError
Sourcepub fn backend(message: impl Into<String>) -> BosonError
pub fn backend(message: impl Into<String>) -> BosonError
Backend failure without an underlying source.
Sourcepub fn backend_source(
message: impl Into<String>,
source: impl Error + Send + Sync + 'static,
) -> BosonError
pub fn backend_source( message: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> BosonError
Backend failure wrapping an underlying error.
Sourcepub fn internal(message: impl Into<String>) -> BosonError
pub fn internal(message: impl Into<String>) -> BosonError
Internal failure without an underlying source.
Sourcepub fn internal_source(
message: impl Into<String>,
source: impl Error + Send + Sync + 'static,
) -> BosonError
pub fn internal_source( message: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> BosonError
Internal failure wrapping an underlying error.
Sourcepub fn backend_message(&self) -> Option<&str>
pub fn backend_message(&self) -> Option<&str>
Message text for Self::Backend, if this is a backend error.
Sourcepub fn is_backend_unique_violation(&self) -> bool
pub fn is_backend_unique_violation(&self) -> bool
True when a backend adapter reported a unique / duplicate-key constraint failure.
Trait Implementations§
Source§impl Debug for BosonError
impl Debug for BosonError
Source§impl Display for BosonError
impl Display for BosonError
Source§impl Error for BosonError
impl Error for BosonError
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()
Source§impl From<Error> for BosonError
impl From<Error> for BosonError
Source§fn from(err: Error) -> BosonError
fn from(err: Error) -> BosonError
Auto Trait Implementations§
impl !RefUnwindSafe for BosonError
impl !UnwindSafe for BosonError
impl Freeze for BosonError
impl Send for BosonError
impl Sync for BosonError
impl Unpin for BosonError
impl UnsafeUnpin for BosonError
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> 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> ⓘ
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> ⓘ
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 more