postgres icon indicating copy to clipboard operation
postgres copied to clipboard

Global error handler

Open EDjur opened this issue 1 year ago • 0 comments

Hi!

First off, thanks a lot for this great project!

I have a use case where I want to be able to catch any errors thrown by my sql client globally. I've tried making a wrapper but had some issues with NOT_TAGGED_CALL errors.

Best case, there would be some onError callback in the options passed to the client initialisation. But barring that, is there any other way to catch errors globally for the sql client instead of sprinkling try/catch around every single query?

Thank you! 🙏

EDjur avatar Dec 13 '23 09:12 EDjur