Using Effect for Error Handling in TypeScript API
hey ya'll, I have a bunch of service/controllers like this:
I want to try to convert just this aspect of my API to use Effect's error handling without turning everything into effect. I just want to be able to wrap my db calls and also throw my own Errors that I can catch and handle before returning a response. I would appreciate any help with getting started, would love to compare the dx boost versus a simple implementation that I have made myself, at least for simple endpoints like this it is working very well, but want to see if I'm missing something.
I want to try to convert just this aspect of my API to use Effect's error handling without turning everything into effect. I just want to be able to wrap my db calls and also throw my own Errors that I can catch and handle before returning a response. I would appreciate any help with getting started, would love to compare the dx boost versus a simple implementation that I have made myself, at least for simple endpoints like this it is working very well, but want to see if I'm missing something.
