diff options
Diffstat (limited to 'src/errors')
-rw-r--r-- | src/errors/auth.rs | 23 | ||||
-rw-r--r-- | src/errors/mod.rs | 3 |
2 files changed, 26 insertions, 0 deletions
diff --git a/src/errors/auth.rs b/src/errors/auth.rs new file mode 100644 index 0000000..cd4741d --- /dev/null +++ b/src/errors/auth.rs @@ -0,0 +1,23 @@ +//! Authentication related error types. + +/// Authentication prompt handler error. +#[derive(Debug, thiserror::Error)] +pub enum AuthPromptHandlerError +{ + /// HTTP server failed to bind to a address. + #[error("HTTP server failed to bind to address")] + BindAddressFailed, +} + +/// Access token request error. +#[derive(Debug, thiserror::Error)] +pub enum AccessTokenRequestError +{ + /// Sending access token request failed. + #[error("Sending access token request failed")] + SendFailed(#[from] reqwest::Error), + + /// Parsing access token respone failed. + #[error("Parsing access token respone failed")] + ResponseParseFailed, +} diff --git a/src/errors/mod.rs b/src/errors/mod.rs new file mode 100644 index 0000000..ea85f4a --- /dev/null +++ b/src/errors/mod.rs @@ -0,0 +1,3 @@ +//! Error types. + +pub mod auth; |