0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Show info on about page task failure

No Issue.
- gh-top-contribs@0.0.4
- package now provides information when a failure occurs.
This commit is contained in:
Jason Williams 2015-01-06 20:45:46 +00:00
parent 04180bc83b
commit 11c7d75b1b
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"
}
}