Class: CustomErrors

Inherits:
Faraday::Response::RaiseError
  • Object
show all
Defined in:
lib/wealthforge/connection.rb

Instance Method Summary collapse

Instance Method Details

#on_complete(env) ⇒ Object



48
49
50
51
52
53
54
55
# File 'lib/wealthforge/connection.rb', line 48

def on_complete(env)
  case env[:status]
  when 400...600
    JSON.parse(env[:body])
  else
    super
  end
end