Merge pull request #404 from jkeiser/jk/error-message
Make error messages print on error
This commit is contained in:
commit
15de60e1d1
|
@ -52,10 +52,10 @@ module GitHubChangelogGenerator
|
||||||
begin
|
begin
|
||||||
value = yield
|
value = yield
|
||||||
rescue Github::Error::Unauthorized => e
|
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"
|
abort "Error: wrong GitHub token"
|
||||||
rescue Github::Error::Forbidden => e
|
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
|
Helper.log.warn GH_RATE_LIMIT_EXCEEDED_MSG.yellow
|
||||||
end
|
end
|
||||||
value
|
value
|
||||||
|
|
Loading…
Reference in New Issue
Block a user