Exception: AutotaskApi::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/autotask_api.rb

Instance Method Summary collapse

Constructor Details

#initialize(msg) ⇒ Error

Returns a new instance of Error.



13
14
15
16
17
18
19
20
# File 'lib/autotask_api.rb', line 13

def initialize(msg)
  # extract SOAP Exception message if present
  if msg.include?('[SoapException:')
    msg = msg[/\[SoapException:(.*?)\]/, 1]&.strip
  end

  super(msg)
end