From ffedd4457bd4956cfeaa929bdb1182df4e40a242 Mon Sep 17 00:00:00 2001 From: Shahab Date: Fri, 12 Apr 2024 12:43:41 +0200 Subject: [PATCH] fixed: used Maybe.None --- CodeJoyRide.Api/Customers/Services/CustomerRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CodeJoyRide.Api/Customers/Services/CustomerRepository.cs b/CodeJoyRide.Api/Customers/Services/CustomerRepository.cs index 6ce9f53..f129976 100644 --- a/CodeJoyRide.Api/Customers/Services/CustomerRepository.cs +++ b/CodeJoyRide.Api/Customers/Services/CustomerRepository.cs @@ -36,7 +36,7 @@ public Maybe Find(string email) .FirstOrDefault(c => c.Email.IsSome && c.Email.UnwrappedValue == email); if (foundedCustomer is null) - throw new CustomerNotFoundException(email); + return CodeJoyRide.Fx.Maybe.None; return Maybe.Some(foundedCustomer); }