diff --git a/Gruntfile.js b/Gruntfile.js index ea96ebf3e5..59b18b9dc5 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -8,6 +8,7 @@ var _ = require('lodash'), colors = require('colors'), fs = require('fs-extra'), + moment = require('moment'), getTopContribs = require('top-gh-contribs'), path = require('path'), Promise = require('bluebird'), @@ -1075,7 +1076,16 @@ var _ = require('lodash'), return downloadImagePromise(contributor.avatarUrl + '&s=60', contributor.name); })); }).then(done).catch(function (error) { - grunt.log.error(error.stack || error); + grunt.log.error(error); + + if (error.http_status) { + grunt.log.writeln('GitHub API request returned status: ' + error.http_status); + } + + if (error.ratelimit_limit) { + grunt.log.writeln('Rate limit data: limit: %d, remaining: %d, reset: %s', error.ratelimit_limit, error.ratelimit_remaining, moment.unix(error.ratelimit_reset).fromNow()); + } + done(false); }); }); diff --git a/package.json b/package.json index ea036c3a4a..2161dc4d9c 100644 --- a/package.json +++ b/package.json @@ -101,6 +101,6 @@ "sinon": "~1.12.2", "supertest": "~0.15.0", "testem": "^0.6.23", - "top-gh-contribs": "0.0.2" + "top-gh-contribs": "0.0.4" } }