Effect CommunityEC
Effect Community6mo ago
3 replies
E

How to avoid NoSuchElementException in `catchTag`

Playground example: https://effect.website/play/#001b2967155e

Right now when I return an Option.none() from a catchTag handler, Effect (seems to) automatically add a NoSuchElementException to the list of Effect errors. But in this case I want to return an Option from the API.

I've tried transforming the result using Effect.either and such but I just can't seem to figure out how to not have NoSuchElementException show up.

Is there a different API than catchTag which acts more like Effect.map rather than Effect.andThen?
Effect Documentation
Was this page helpful?