How to handle TypeError: Cannot read properties of undefined (reading 'constructor') error in bot #1788
Unanswered
simanye-pav
asked this question in
Q&A
Replies: 1 comment
-
Maybe this is a better issue for https://github.com/hnaderi/telegraf-session-mysql |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
please help.
I'm making use of the node-mysql2 libraries and telegraf-mysql-session
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. Then the bot doesn't run at all.
The error originates from the mysql2 connection.js file
Where it is triggered:
It freezes the bot., and the bot just automatically gets this error whenever I restart it. How can I add an error handler that will handle this error when the bot gets it. Because it's effect the users
Beta Was this translation helpful? Give feedback.
All reactions