Skip to content

Commit

Permalink
Merge pull request #2 from maxogden/patch-2
Browse files Browse the repository at this point in the history
pass back entire response from github in case of error
  • Loading branch information
rvagg committed May 13, 2014
2 parents b9d6479 + 0e93197 commit b85cedb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ghauth.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function createAuth (options, callback) {
data = JSON.parse(data.toString())

if (data.message)
return callback(new Error(data.message))
return callback(new Error(JSON.stringify(data)))
if (!data.token)
return callback(new Error('No token from GitHub!'))

Expand Down

0 comments on commit b85cedb

Please sign in to comment.