const DoWork = Effect.gen(function* () { return yield* FiberHandle.run( handleRef, // verified this error gets created Effect.tryPromise(...).pipe(Effect.mapError((e) => new CustomError(...)), )})
const DoWork = Effect.gen(function* () { return yield* FiberHandle.run( handleRef, // verified this error gets created Effect.tryPromise(...).pipe(Effect.mapError((e) => new CustomError(...)), )})
elsewhere, this is getting invoked:
Effect.gen(function* () { if (condition) { yield* DoWork }// this is never called}).pipe(Effect.catchAll((e) => Console.error(e)),
Effect.gen(function* () { if (condition) { yield* DoWork }// this is never called}).pipe(Effect.catchAll((e) => Console.error(e)),
however, the errors that are catchable from within the fiber are not propagated to the parent Effect. This is tracked in the types as well - the type of