pub enum WebhookError<H> {
ParseError(Error),
HandlerError(H),
InvalidSignature,
InvalidInstance(String),
ProcessingError(String),
UnknownEventType(String),
}Expand description
Errors that can occur when processing webhook events
The generic parameter H represents the error type from the event handler.
Variants§
ParseError(Error)
Failed to parse the webhook payload as JSON
HandlerError(H)
Error occurred in the event handler
InvalidSignature
Webhook signature verification failed
InvalidInstance(String)
Invalid Discourse instance specified
ProcessingError(String)
General processing error
UnknownEventType(String)
Unknown or unsupported event type
Trait Implementations§
Source§impl<H: Debug> Debug for WebhookError<H>
impl<H: Debug> Debug for WebhookError<H>
Source§impl<H> Display for WebhookError<H>where
H: Display,
impl<H> Display for WebhookError<H>where
H: Display,
Source§impl<H> Error for WebhookError<H>
impl<H> Error for WebhookError<H>
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<H> Freeze for WebhookError<H>where
H: Freeze,
impl<H> !RefUnwindSafe for WebhookError<H>
impl<H> Send for WebhookError<H>where
H: Send,
impl<H> Sync for WebhookError<H>where
H: Sync,
impl<H> Unpin for WebhookError<H>where
H: Unpin,
impl<H> !UnwindSafe for WebhookError<H>
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