pub enum Hook0ClientError {
AuthHeader(InvalidHeaderValue),
ReqwestClient(Error),
Url(ParseError),
EventSending {
event_id: Uuid,
error: Error,
body: Option<String>,
},
InvalidEventType(String),
GetAvailableEventTypes(Error),
CreatingEventType {
event_type_name: String,
error: Error,
},
}
Expand description
Every error Hook0 client can encounter
Variants§
AuthHeader(InvalidHeaderValue)
Cannot build a structurally-valid Authorization
header
This is an internal error that is unlikely to happen.
ReqwestClient(Error)
Cannot build a Reqwest HTTP client
This is an internal error that is unlikely to happen.
Url(ParseError)
Cannot build a structurally-valid endpoint URL
This is an internal error that is unlikely to happen.
EventSending
Something went wrong when sending an event to Hook0
Fields
InvalidEventType(String)
Provided event type does not have a valid syntax
GetAvailableEventTypes(Error)
Something went wrong when trying to fetch the list of available event types
CreatingEventType
Something went wrong when creating an event type
Implementations§
Source§impl Hook0ClientError
impl Hook0ClientError
Sourcepub fn log_and_return(self) -> Self
pub fn log_and_return(self) -> Self
Log the error (using the log crate) and return it as a result of this function’s call
Trait Implementations§
Source§impl Debug for Hook0ClientError
impl Debug for Hook0ClientError
Source§impl Display for Hook0ClientError
impl Display for Hook0ClientError
Source§impl Error for Hook0ClientError
impl Error for Hook0ClientError
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 Hook0ClientError
impl !RefUnwindSafe for Hook0ClientError
impl Send for Hook0ClientError
impl Sync for Hook0ClientError
impl Unpin for Hook0ClientError
impl !UnwindSafe for Hook0ClientError
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