Data.TaggedError for it, so I can yield it in my effects. It is handled at the very root of the program (it detects the failure and throws the actual WaitingForChildrenError so BullMQ registers it properly). There are two approaches: Using Effect.fail and Effect.die. I can catch both Failures and Defects in the root. The only difference seems to be that my custom WaitingForChildrenError appears in the Error types of the effects when using a Failure.