Skip to content

Commit

Permalink
Merge pull request #26 from heytitle/better-handle-error
Browse files Browse the repository at this point in the history
Better handle error
  • Loading branch information
supasate authored Oct 2, 2016
2 parents c8ba631 + 11f7bed commit 7b9b028
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ var youpin;
new api_lib(API_URI, API_USERNAME, API_PASSWORD).then(function(api) {
// Youpin bot
youpin = require('./youpin.js')(m, api, conversation, API_USER_ID);
}).catch(err => {
console.log(err)
if (process.env.NODE_ENV !== "production") {
process.exit(1);
}
});

// Index route
Expand Down

0 comments on commit 7b9b028

Please sign in to comment.