|
Is it possible to create global error handler which catch all sql errors in queries even if query have their own specified callback ? |
Answered by
sidorares
Feb 9, 2023
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 ) |
0 replies
Answer selected by
DarkGL
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 )