Skip to content

Commit

Permalink
Log unexpected status codes in its_a_small_world
Browse files Browse the repository at this point in the history
  • Loading branch information
akiraspeirs committed Feb 12, 2016
1 parent 1476114 commit 5c68282
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions problems/its_a_small_world/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,16 @@ exec('git config user.username', function(err, stdout, stdrr) {
function collaborating(username) {
request(url + username, {json: true}, function (error, response, body) {
if (error) console.log(error)
if (!error && response.statusCode == 200) {
if (body.collab = true) console.log("Reporobot has been added!")
else console.log("Reporobot doesn't have access to the fork")
if (body.error) console.log(body)
if (!error) {
if (response.statusCode == 200) {
if (body.collab = true) console.log("Reporobot has been added!")
else console.log("Reporobot doesn't have access to the fork")
if (body.error) console.log(body)
}
else {
console.log("Unexpected HTTP status code accessing Reporobot server: " +
response.statusCode)
}
}
})
}

0 comments on commit 5c68282

Please sign in to comment.