Skip to content

Commit

Permalink
Support 500-error responses to API requests
Browse files Browse the repository at this point in the history
  • Loading branch information
haakonnessjoen committed Apr 1, 2016
1 parent 0ec10d1 commit 1f0c11a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/visualplatform.js
Expand Up @@ -74,6 +74,8 @@ module.exports = Visualplatform = function(domain, key, secret, callback_url){
console.log('JSON parse error', e);
return reject('Error parsing json');
}
}).on('fail', function(message) {
return reject(message);
}).on('error', function(err) {
err = JSON.parse(err);
return reject(err.message);
Expand Down

0 comments on commit 1f0c11a

Please sign in to comment.