Should define a Error type rather than generate error type for every struct
yjhmelody opened this issue · 1 comments
yjhmelody commented
The generated error type is not very useful.
greyblake commented
The idea of a specific error for every particular struct is that:
- Looking at the definition of error type one can easily say which validation rules are there
- It enables exhaustive error handling
In the further versions I am planning to introduce something like GenericValidationError
, so every specific validation error will be convertable into GenericValidationError