How to user ErrorOr with void methods? Let's say I would like to validate errors on caller side but don't wanna return anything as result from the method.
I don't get exactly what you want to achieve, but the erroror as every result pattern library have the usage of returning some kind of union (one or the other), so if you are using a method that returns void, you are not using the library
Thank you Spiro, excellent video on this important pattern... great supplement to the docs of the library
Thank you very much!
Thanks a million. Exactly what I was looking for with no fluff and straight to the point.
Following the channel for sure!
Thanks a lot man!!!
i was wondering how to do that with a void method.
Didn't know you can do an ErrorOr
Thanks for the tutorial
Glad I could help!
thanks for the ErrorOr tutorial
You are very welcome!
that's simple and clean
thank you
You're very welcome!
How to user ErrorOr with void methods? Let's say I would like to validate errors on caller side but don't wanna return anything as result from the method.
I don't get exactly what you want to achieve, but the erroror as every result pattern library have the usage of returning some kind of union (one or the other), so if you are using a method that returns void, you are not using the library
So in void method we can't have error or what?
You can use ErrorOr so you can return Success if not failed and the error otherwise.