How to Implement the Result Pattern with the ErrorOr Library

Поделиться
HTML-код
  • Опубликовано: 25 дек 2024

Комментарии • 14

  • @unhandledexception1948
    @unhandledexception1948 3 месяца назад

    Thank you Spiro, excellent video on this important pattern... great supplement to the docs of the library

  • @jaymartinez311
    @jaymartinez311 9 месяцев назад

    Thanks a million. Exactly what I was looking for with no fluff and straight to the point.
    Following the channel for sure!

  • @masaftic
    @masaftic 19 дней назад

    i was wondering how to do that with a void method.
    Didn't know you can do an ErrorOr
    Thanks for the tutorial

  • @projkbsta
    @projkbsta Год назад

    thanks for the ErrorOr tutorial

  • @ahmadalmasri4416
    @ahmadalmasri4416 7 месяцев назад

    that's simple and clean
    thank you

  • @fresh0bm
    @fresh0bm 3 месяца назад

    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.

    • @spyroskatsios
      @spyroskatsios  3 месяца назад

      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

    • @fresh0bm
      @fresh0bm 3 месяца назад

      So in void method we can't have error or what?

    • @spyroskatsios
      @spyroskatsios  2 месяца назад

      You can use ErrorOr so you can return Success if not failed and the error otherwise.