diff options
Diffstat (limited to 'src/error/client.rs')
| -rw-r--r-- | src/error/client.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/error/client.rs b/src/error/client.rs index 9b2c89b..b678d66 100644 --- a/src/error/client.rs +++ b/src/error/client.rs | |||
| @@ -10,6 +10,8 @@ pub enum ClientError { | |||
| 10 | UserNotFound { id: i64 }, | 10 | UserNotFound { id: i64 }, |
| 11 | NotQueueOwner { id: i64 }, | 11 | NotQueueOwner { id: i64 }, |
| 12 | QueueNotFound { id: i64 }, | 12 | QueueNotFound { id: i64 }, |
| 13 | NoInviteTokenAccess { id: i64 }, | ||
| 14 | InviteTokenNotFound { id: i64 }, | ||
| 13 | } | 15 | } |
| 14 | 16 | ||
| 15 | impl ClientError { | 17 | impl ClientError { |
| @@ -26,6 +28,8 @@ impl ClientError { | |||
| 26 | Self::UserNotFound { .. } => "UserNotFound", | 28 | Self::UserNotFound { .. } => "UserNotFound", |
| 27 | Self::NotQueueOwner { .. } => "NotQueueOwner", | 29 | Self::NotQueueOwner { .. } => "NotQueueOwner", |
| 28 | Self::QueueNotFound { .. } => "QueueNotFound", | 30 | Self::QueueNotFound { .. } => "QueueNotFound", |
| 31 | Self::NoInviteTokenAccess { .. } => "NoInviteTokenAccess", | ||
| 32 | Self::InviteTokenNotFound { .. } => "InviteTokenNotFound", | ||
| 29 | } | 33 | } |
| 30 | .to_string() | 34 | .to_string() |
| 31 | } | 35 | } |
| @@ -50,6 +54,10 @@ impl ClientError { | |||
| 50 | format!("you are not the owner of the queue with id `{}`", id) | 54 | format!("you are not the owner of the queue with id `{}`", id) |
| 51 | } | 55 | } |
| 52 | Self::QueueNotFound { id } => format!("queue with id `{}` not found", id), | 56 | Self::QueueNotFound { id } => format!("queue with id `{}` not found", id), |
| 57 | Self::NoInviteTokenAccess { id } => { | ||
| 58 | format!("you don't have access to the invite token with id `{}`", id) | ||
| 59 | } | ||
| 60 | Self::InviteTokenNotFound { id } => format!("invite token with id `{}` not found", id), | ||
| 53 | } | 61 | } |
| 54 | } | 62 | } |
| 55 | } | 63 | } |
