Make error messages print on error

This commit is contained in:
John Keiser 2016-08-08 12:37:46 -07:00
parent b02e8402b3
commit c66b0f9aff

View File

@ -52,10 +52,10 @@ module GitHubChangelogGenerator
begin
value = yield
rescue Github::Error::Unauthorized => e
Helper.log.error e.body.red
Helper.log.warn e.error_messages.map { |m| m[:message] }.join(", ").red
abort "Error: wrong GitHub token"
rescue Github::Error::Forbidden => e
Helper.log.warn e.body.red
Helper.log.warn e.error_messages.map { |m| m[:message] }.join(", ").red
Helper.log.warn GH_RATE_LIMIT_EXCEEDED_MSG.yellow
end
value