unthrown icon indicating copy to clipboard operation
unthrown copied to clipboard

`TaggedError` requirement

Open rrmesquita opened this issue 3 months ago • 0 comments

Problem

— I would open this as a discussion, but this repo has disabled discussions tab.

First, thank you so much for the effort you've put in this library. It looks great at a glance!

I wonder if the usage of TaggedError is a hard requirement for this lib to work well, or if it can be used with normal errors too. I ask this because we already use another solution for modelling domain errors, so depending on this library at this level is almost an adoption barrier. Nevethrow allows anything to be used in error paths, so I assume the role of TaggedError is to filter which errors are modeled and which are unexpected. To be clear, I'm just asking the design decision behind TaggedError.

Proposed solution

I think a better interoperability with the user's existing errors could greatly increase this library's adoption.

Alternatives considered

No response

Scope check

  • [x] I've read CLAUDE.md and this doesn't duplicate an existing concept or a deliberately-excluded one (generator do-notation, error accumulation, aliases, an Option type).

rrmesquita avatar Aug 14 '26 19:08 rrmesquita