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

Exit gracefully when SLACK_TOKEN is not set #9

Closed
osxi opened this issue Dec 24, 2015 · 1 comment
Closed

Exit gracefully when SLACK_TOKEN is not set #9

osxi opened this issue Dec 24, 2015 · 1 comment

Comments

@osxi
Copy link

osxi commented Dec 24, 2015

I read the README but decided I'd try node main.js anyway and got this error:

TypeError: Cannot read property 'map' of undefined
    at /home/zach/code/terminal-slack/main.js:77:17
    at Request._callback (/home/zach/code/terminal-slack/slackClient.js:34:26)
    at Request.self.callback (/home/zach/code/terminal-slack/node_modules/request/request.js:368:22)
    at emitTwo (events.js:87:13)
    at Request.emit (events.js:172:7)
    at Request.<anonymous> (/home/zach/code/terminal-slack/node_modules/request/request.js:1219:14)
    at emitOne (events.js:82:20)
    at Request.emit (events.js:169:7)
    at IncomingMessage.<anonymous> (/home/zach/code/terminal-slack/node_modules/request/request.js:1167:12)
    at emitNone (events.js:72:20)

It would be better if the user had a friendly message and followed by process.exit(1).

@evanyeung
Copy link
Owner

This was fixed in commit c21b181. Thanks for bringing it up!

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