Managing Service Errors in Effect: Best Practices for Avoiding Implementation Detail Leaks
Now that I've been using Effect more and more I noticed a pattern emerging where to avoid leaking too many details from Services provided as layers. I only fail the Effect on failures I intend to handle, like a conflict for example but other errors like aws service errors I
Effect.die on so that my layer does not leak implementation details. In the outermost layer I catch failures, log them and return an internal error, so essentially for errors I'd return internal error on I use the defects instead of typed errors. Is this the intended way to do this?