feat: handle Store-related errors from Identity DB port

This commit is contained in:
Aravinth Manivannan 2025-01-09 01:16:40 +05:30
parent e52530f0e3
commit a105d85e26
Signed by: realaravinth
GPG key ID: F8F50389936984FF

View file

@ -29,6 +29,9 @@ pub enum IdentityError {
EmployeeNotFound,
InviteNotFound,
StoreNotFound,
DuplicateStoreName,
StoreIDNotFound,
DuplicateStoreID,
}
pub type IdentityCommandResult<V> = Result<V, IdentityCommandError>;
@ -74,6 +77,9 @@ impl From<OutDBPortError> for IdentityError {
OutDBPortError::PhoneNumberNotFound => Self::PhoneNumberNotFound,
OutDBPortError::EmpLoginOTPNotFound => Self::LoginOTPNotFound,
OutDBPortError::EmpVerificationOTPNotFound => Self::VerificationOTPNotFound,
OutDBPortError::DuplicateStoreName => Self::DuplicateStoreName,
OutDBPortError::DuplicateStoreID => Self::DuplicateStoreID,
OutDBPortError::StoreIDNotFound => Self::StoreIDNotFound,
}
}
}