Today we throw a exception when some validation get wrong, but it's not a good thing.
To avoid throw exceptions all the time, we need to start to use result pattern.
We need to create a base result model and then modify the validations to add a error message when some validation get wrong and return it to front end.
Today we throw a exception when some validation get wrong, but it's not a good thing.
To avoid throw exceptions all the time, we need to start to use result pattern.
We need to create a base result model and then modify the validations to add a error message when some validation get wrong and return it to front end.