Handling errors in Effect's `tryPromise` can be a bit tricky if you're not familiar with how Effe...
Hi, I'm struggling to handle properly an error thrown in a tryPromise.
If I return directly the error like in the commented line of the insert, I get the error I can evaluate in my tests. But if the error is return from the tryPromise, it seems to act as a thrown error, and I can't find a way to handle it in tests in an Effect's way. What bother me is that with the immediate return of the error, or the tryPromise code insert has the same error signature Effect.Effect<never ( or string), AlreadyExistsError, never >
If I return directly the error like in the commented line of the insert, I get the error I can evaluate in my tests. But if the error is return from the tryPromise, it seems to act as a thrown error, and I can't find a way to handle it in tests in an Effect's way. What bother me is that with the immediate return of the error, or the tryPromise code insert has the same error signature Effect.Effect<never ( or string), AlreadyExistsError, never >
