You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How handy would it be to not just return a string as an error but a type with more details about the error like: code, message, severity, innerError, ...
For an ongoing project, I needed this feature. I will be proposing a merge request containing this feature hoping that it will be merged.
The text was updated successfully, but these errors were encountered:
long time ago I was trying to prototype support for custom types that describe validation errors, so that you can define own sealed type family. For example:
I gave up on this idea because of some variance issues and overall interface/implementation complexity that wouldn't be justified for simple cases. So for now we have only strings as error messages.
If you want to experiment, possibly with different design goals, please go on. PRs are always welcome. But please make sure that proposed change doesn't affect existing users (that are fine with pure strings) too much :)
How handy would it be to not just return a string as an error but a type with more details about the error like: code, message, severity, innerError, ...
For an ongoing project, I needed this feature. I will be proposing a merge request containing this feature hoping that it will be merged.
The text was updated successfully, but these errors were encountered: