Class: Nimbox::ResponseError

Inherits:
Rapidash::ResponseError
  • Object
show all
Defined in:
lib/nimbox/response_error.rb

Instance Method Summary collapse

Instance Method Details

#errorsObject



3
4
5
6
7
# File 'lib/nimbox/response_error.rb', line 3

def errors
  return body if body.kind_of?(String)

  body['errors'].to_a.map { |key, val| "#{key} #{val[0]}" }.join(', ')
end