Module: Kaui::ErrorHelper

Included in:
AccountEmail, EngineController
Defined in:
lib/kaui/error_helper.rb

Instance Method Summary collapse

Instance Method Details

#as_string(e) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/kaui/error_helper.rb', line 5

def as_string(e)
  if e.is_a?(RestClient::Exception)
    "#{e.message} #{e.response}".split(/\n/).take(5).join("\n")
  else
    e.message
  end
end