Choosing Between `Effect` and `Either` for Error Handling

Another beginner question (thanks for the previous answers! very helpful)

Both of these screenshots are from the docs and seem to me to be very similar use-cases. This made me wonder "When should I use
Effect
and when Either?" So I went to the docs describing Either and found:

Either is primarily used as a simple discriminated union and is not recommended as the main result type for operations requiring detailed error information.

Exit is the preferred result type within Effect for capturing comprehensive details about failures. It encapsulates the outcomes of effectful computations, distinguishing between success and various failure modes, such as errors, defects and interruptions.

Does this mean that the 1st (darkmode) screenshot is non-idiomatic? should it have been an
Effect
instead?
Screenshot_2025-02-20_at_13.28.26.png
Screenshot_2025-02-20_at_13.28.14.png
Was this page helpful?