0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Merge pull request #4767 from jaswilli/contribs-task-info

Show info on about page task failure
This commit is contained in:
Hannah Wolfe 2015-01-08 12:42:05 +00:00
commit 0b7a6c52f0
2 changed files with 12 additions and 2 deletions

View file

@ -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);
});
});

View file

@ -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"
}
}