Skip to content
This repository has been archived by the owner on Nov 10, 2021. It is now read-only.

Commit

Permalink
slack: improve error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
rauchg committed Jul 20, 2016
1 parent 75c7822 commit 9eaf052
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/slack.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ export default class SlackData extends EventEmitter {
.query({ token: this.token })
.end((err, res) => {
let team = res.body.team
if (!team) {
throw new Error('Bad Slack response. Make sure the team name and API keys are correct');
}
this.org.name = team.name
if (!team.icon.image_default) {
this.org.logo = team.icon.image_132
Expand Down

0 comments on commit 9eaf052

Please sign in to comment.