Comparing Error Handling Approaches in TypeScript: Effect.void.pipe vs. Effect.tryPromise

Which approach is better: using

Effect.void.pipe(Effect.andThen(promise))


followed by mapping the error to a custom error class, or using

Effect.tryPromise()


and directly handling the error with a custom error class in the catch section?
Was this page helpful?