Closed stephenyeargin closed 1 year ago
I've addressed this fairly directly in my verveguy/slack-poker-bot fork by catching the auth error and reporting
[INFO] @slack/client:RTMClient:3 unable to RTM start: An API error occurred: invalid_auth logger.js:54 Slack authentication failed. Check that your SLACK_POKER_BOT_TOKEN is valid
Adequate?
Lost quite a bit of time debugging while trying to update our bot today. If you provide a bogus (read: somebody regenerated it)
SLACK_POKER_BOT_TOKEN
, the error output isn't terribly descriptive as to why the application refuses to start.Ideally, a sanity check would be done on initialization to verify that the token can actually connect to the API. If not, the logs should contain a descriptive "Invalid token, please check your credentials." message instead of
Uncaught, unspecified "error" event.