fix: identity: derive error for IdentityError

This commit is contained in:
Aravinth Manivannan 2024-05-19 00:35:45 +05:30
parent 51894cfcb7
commit 1f25754822
Signed by: realaravinth
GPG key ID: F8F50389936984FF

View file

@ -3,12 +3,12 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
use argon2_creds::CredsError;
use derive_more::Display;
use derive_more::{Display, Error};
use serde::{Deserialize, Serialize};
pub type IdentityResult<V> = Result<V, IdentityError>;
#[derive(Debug, Display, Clone, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)]
#[derive(Debug, Error, Display, Clone, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)]
pub enum IdentityError {
DuplicateUsername,
VerificationOTPSecretNotFound,