-
Is it possible to create global error handler which catch all sql errors in queries even if query have their own specified callback ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I don't think its currently possible, if you have I'm open for discussions of more advanced events and hooks system ( events - allow to log all queries / parameters etc, hooks - allow to run code before / after connection open and close, query, pool get or release with ability to modify or cancel next step if required ) |
Beta Was this translation helpful? Give feedback.
I don't think its currently possible, if you have
conn.query(sql, params, callback)
the error only flows into callback and is not bubbling upI'm open for discussions of more advanced events and hooks system ( events - allow to log all queries / parameters etc, hooks - allow to run code before / after connection open and close, query, pool get or release with ability to modify or cancel next step if required )