From 179f5486ba1a734f12f8b0bd195640b1c52aef85 Mon Sep 17 00:00:00 2001 From: Mike Dilger Date: Sun, 18 Feb 2024 08:20:21 +1300 Subject: [PATCH] ChorusError::AuthFailure --- src/error.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/error.rs b/src/error.rs index 8fca380..e99b288 100644 --- a/src/error.rs +++ b/src/error.rs @@ -22,6 +22,9 @@ impl std::fmt::Display for Error { /// Errors that can occur in the chorus crate #[derive(Debug)] pub enum ChorusError { + // Auth failure + AuthFailure, + // Bad event id BadEventId, @@ -110,6 +113,7 @@ pub enum ChorusError { impl std::fmt::Display for ChorusError { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { + ChorusError::AuthFailure => write!(f, "AUTH failure"), ChorusError::BadEventId => write!(f, "Bad event id, does not match hash"), ChorusError::BadHexInput => write!(f, "Bad hex input"), ChorusError::BufferTooSmall => write!(f, "Output buffer too small"),