From a105d85e26eab3b731a51d73b573c890162ea08c Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Thu, 9 Jan 2025 01:16:40 +0530 Subject: [PATCH] feat: handle Store-related errors from Identity DB port --- src/identity/application/services/errors.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/identity/application/services/errors.rs b/src/identity/application/services/errors.rs index 2730859..253a70b 100644 --- a/src/identity/application/services/errors.rs +++ b/src/identity/application/services/errors.rs @@ -29,6 +29,9 @@ pub enum IdentityError { EmployeeNotFound, InviteNotFound, StoreNotFound, + DuplicateStoreName, + StoreIDNotFound, + DuplicateStoreID, } pub type IdentityCommandResult = Result; @@ -74,6 +77,9 @@ impl From 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, } } }