TypeError: Cannot read properties of undefined (reading 'constructor'), How can I avoid getting this error? #1808
Unanswered
simanye-pav
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
please help.
I'm making use of the node-mysql2 library
I have SQL queries and whenever a query is run and some variables are null in that query it triggers this error. This is usually when the session variables are null. AgentID=Null or DealerID=Null.
The error originates from the mysql2 connection.js file
Where it is triggered:
It freezes my whole app/telegram bot. and doesn't allow me to restart the app.
How can I add an error handler that will check if the variables are undefined or null to avoid ever getting this error. When I do get this error to handle it appropriately.
Beta Was this translation helpful? Give feedback.
All reactions