Pratik Bhusal
06/26/2024, 2:51 AMKev
06/26/2024, 4:10 AMUserNotFound
would be the domain error for a logical failure where getUserById
returns nothing (being the logical failure).Pratik Bhusal
06/26/2024, 4:28 AMgetUserById
returns nothing
Domain error: To indicate the kind of logical error we have, we return a Either.left(UserNotFound)
.Pratik Bhusal
06/26/2024, 4:29 AMKev
06/26/2024, 4:49 AMgetUserById
returning nothing or null where you expected it to return some value. Then this method would (if an either), return an Either.Left representation of the domain error.Alejandro Serrano.Mena
06/26/2024, 7:17 AMUlrich Schuster
06/26/2024, 11:07 AMPratik Bhusal
06/26/2024, 2:56 PMUlrich Schuster
06/26/2024, 3:30 PM