How to access error events -- Is there a best/good practice for error handling
I'm writing my methods and associated tests for db access and when trying to validate error events. I get a SQL event log but nothing is caught in my try-catch block. When I log the response it is either empty or
undefined
.
*Example
I don't see in the docs where expected errors are defined. Thank you for your time. Cheers,2 Replies
Try
Thank you for the response. This doesn't seem to work. I attempted to create the same table twice and it logs and error but does not throw and error or return and error object for work with. To me, this implies that I will have to write checks or come up with some other error handling pattern.
What are other people/teams doing for tests and error handling coverage?