Class: Bcx::ResponseError

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

Instance Method Summary collapse

Instance Method Details

#errorsObject



24
25
26
27
28
29
30
31
32
33
34
# File 'lib/bcx/response_error.rb', line 24

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

  messages = []

  body.each_pair do |attribute, msgs|
    msgs.each { |msg| messages.push "#{attribute} #{msg}" }
  end

  messages.join(', ')
end