Method: Travis::Client::ValidationFailed#parse_message
- Defined in:
- lib/travis/client/error.rb
#parse_message(message) ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/travis/client/error.rb', line 46 def () response = JSON.parse() = response['message'].to_s if (@errors = response['errors']) && @errors.any? readable = @errors.map { |e| "#{e['field']}: #{e['code'].gsub('_', ' ')}" } += " (#{readable.join(', ')})" end rescue JSON::ParserError end |