Skip to main content

omnihook/
error.rs

1use thiserror::Error;
2
3/// Errors that can occur within omnihook operations.
4#[derive(Debug, Error)]
5pub enum OmnihookError {
6    /// An error related to invalid or missing configuration.
7    #[error("Configuration error: {0}")]
8    ConfigError(String),
9
10    /// An error indicating that the payload could not be serialized.
11    #[error("Serialization error: {0}")]
12    SerializationError(String),
13
14    /// An error indicating that the payload could not be signed.
15    #[error("Signing error: {0}")]
16    SigningError(String),
17
18    /// An error indicating that the notification failed to be sent.
19    #[error("Notification failed: {0}")]
20    NotifyFailed(String),
21
22    /// An error from the underlying `reqwest` or `reqwest_middleware`
23    /// libraries.
24    #[error("Request error: {0}")]
25    RequestError(#[from] reqwest_middleware::Error),
26}