Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle Errors caused by using wrong command. #27

Open
yashmehrotra opened this issue Feb 3, 2017 · 0 comments
Open

Handle Errors caused by using wrong command. #27

yashmehrotra opened this issue Feb 3, 2017 · 0 comments
Assignees

Comments

@yashmehrotra
Copy link
Member

yashmehrotra commented Feb 3, 2017

For eg. @osdc-bot karma is the wrong command.

Below is the traceback. This causes the app to exit.

[INFO] In loop karma
/home/osdc-bot/chatbot.js:57
    } else if (msgBody[2].trim() === "++") {
                         ^

TypeError: Cannot read property 'trim' of undefined
    at getBotReply (/home/osdc-bot/chatbot.js:57:26)
    at Request._callback (/home/osdc-bot/api.js:32:9)
    at Request.self.callback (/home/osdc-bot/node_modules/request/request.js:187:22)
    at emitTwo (events.js:87:13)
    at Request.emit (events.js:172:7)
    at Request.<anonymous> (/home/osdc-bot/node_modules/request/request.js:1044:10)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)
    at IncomingMessage.<anonymous> (/home/osdc-bot/node_modules/request/request.js:965:12)
    at emitNone (events.js:72:2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants