#[non_exhaustive]pub enum ObserverError {
InvalidCondition {
message: String,
},
TemplateError {
message: String,
},
ActionFailed {
action: String,
message: String,
},
InvalidConfig {
message: String,
},
ProcessingFailed {
message: String,
},
MaxRetriesExceeded {
event_id: String,
},
Database(Error),
}Expand description
Domain-level observer errors for RuntimeError aggregation.
These are the client-facing observer error variants. For operational
observer errors with structured OB-codes (used in logging and retry
decisions), see fraiseql_observers::ObserverError.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidCondition
The observer’s trigger condition expression could not be parsed or evaluated.
TemplateError
An error occurred while rendering an observer action template (e.g. an email body or webhook payload template).
ActionFailed
The configured action (e.g. HTTP call, notification dispatch) failed to execute.
Fields
InvalidConfig
The observer definition contains an invalid or inconsistent configuration value.
ProcessingFailed
The event payload could not be processed (e.g. deserialization failed or required fields were missing).
MaxRetriesExceeded
The event has been retried the maximum number of times without succeeding and is being moved to the dead-letter queue.
Database(Error)
A database error occurred while recording observer state or audit logs.
Implementations§
Source§impl ObserverError
impl ObserverError
Sourcepub const fn error_code(&self) -> &'static str
pub const fn error_code(&self) -> &'static str
Returns a short, stable error code string suitable for API responses and structured logging.
Trait Implementations§
Source§impl Debug for ObserverError
impl Debug for ObserverError
Source§impl Display for ObserverError
impl Display for ObserverError
Source§impl Error for ObserverError
impl Error for ObserverError
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 ObserverError
impl From<Error> for ObserverError
Source§impl From<ObserverError> for RuntimeError
impl From<ObserverError> for RuntimeError
Source§fn from(source: ObserverError) -> Self
fn from(source: ObserverError) -> Self
Auto Trait Implementations§
impl Freeze for ObserverError
impl !RefUnwindSafe for ObserverError
impl Send for ObserverError
impl Sync for ObserverError
impl Unpin for ObserverError
impl UnsafeUnpin for ObserverError
impl !UnwindSafe for ObserverError
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
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