diff options
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs index c5506c2..eeca1e8 100644 --- a/src/error.rs +++ b/src/error.rs @@ -4,9 +4,18 @@ pub enum Error { #[snafu(display("failed to accept: {}", source))] Acceptor { source: tokio::io::Error }, + #[snafu(display( + "oauth configuration for auth type {:?} not found", + ty + ))] + AuthTypeMissingOauthConfig { ty: crate::protocol::AuthType }, + #[snafu(display("auth type {:?} not allowed", ty))] AuthTypeNotAllowed { ty: crate::protocol::AuthType }, + #[snafu(display("auth type {:?} does not use oauth", ty))] + AuthTypeNotOauth { ty: crate::protocol::AuthType }, + #[snafu(display("failed to bind to {}: {}", address, source))] Bind { address: std::net::SocketAddr, @@ -127,6 +136,16 @@ pub enum Error { ))] NotAFileName { path: String }, + #[snafu(display( + "missing oauth configuration item {} for auth type {}", + field, + auth_type.name(), + ))] + OauthMissingConfiguration { + field: String, + auth_type: crate::protocol::AuthType, + }, + #[snafu(display("failed to open file {}: {}", filename, source))] OpenFile { filename: String, |