You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Nodejs application, I want to start multiple Wechaty PuppetPadpro bot instances dynamically based on an HTTP request. A token for a new instance of Wechaty bot is passed along with the request. But if for some reason not a valid token is passed to Wechaty bot, library prints error and calls process process.exit(-1); which stops the whole Nodejs process with multiple running bot instances. Can somehow I modify Wechaty bot behavior to not perform process.exit(-1); but just print error instead?
I tried to catch errors from bot.start().catch(error => console.log("error"));
tried to wrap into Domain to catch errors, but nothing seems to work.
Message that I receive:
The token is invalid, please use an valid token to access padchat
If you have question about this, please check out our wiki:
https://github.com/botorange/wechaty-puppet-padpro/wiki/Buy-Padpro-Token
你使用的Token是无效的,请你联系我们获取有效Token,详情请参考这个页面:
https://github.com/botorange/wechaty-puppet-padpro/wiki/%E8%B4%AD%E4%B9%B0token
I expect bot just emits error event on an invalid token, but instead, bot terminates Nodejs process.
P.S. thought about posting question to stack overflow as was recommended but got an error on: Creating the new tag 'wechaty' requires at least 1500 reputation. Try something from the existing tags list instead.
The text was updated successfully, but these errors were encountered:
In Nodejs application, I want to start multiple Wechaty PuppetPadpro bot instances dynamically based on an HTTP request. A token for a new instance of Wechaty bot is passed along with the request. But if for some reason not a valid token is passed to Wechaty bot, library prints error and calls process
process.exit(-1);
which stops the whole Nodejs process with multiple running bot instances. Can somehow I modify Wechaty bot behavior to not performprocess.exit(-1);
but just print error instead?I tried to catch errors from
bot.start().catch(error => console.log("error"));
tried to wrap into Domain to catch errors, but nothing seems to work.
Message that I receive:
I expect bot just emits error event on an invalid token, but instead, bot terminates Nodejs process.
P.S. thought about posting question to stack overflow as was recommended but got an error on:
Creating the new tag 'wechaty' requires at least 1500 reputation. Try something from the existing tags list instead.
The text was updated successfully, but these errors were encountered: