Exception: Twilio::REST::RestErrorV10

Inherits:
TwilioError
  • Object
show all
Defined in:
lib/twilio-ruby/framework/rest/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ RestErrorV10

Returns a new instance of RestErrorV10.



42
43
44
45
46
47
48
# File 'lib/twilio-ruby/framework/rest/error.rb', line 42

def initialize(response)
  @code = response['code']
  @message = response['message']
  @http_status_code = response['httpsStatusCode']
  @params = response['params']
  @user_error = response['userError']
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



40
41
42
# File 'lib/twilio-ruby/framework/rest/error.rb', line 40

def code
  @code
end

#http_status_codeObject

Returns the value of attribute http_status_code.



40
41
42
# File 'lib/twilio-ruby/framework/rest/error.rb', line 40

def http_status_code
  @http_status_code
end

#messageObject

Returns the value of attribute message.



40
41
42
# File 'lib/twilio-ruby/framework/rest/error.rb', line 40

def message
  @message
end

#paramsObject

Returns the value of attribute params.



40
41
42
# File 'lib/twilio-ruby/framework/rest/error.rb', line 40

def params
  @params
end

#user_errorObject

Returns the value of attribute user_error.



40
41
42
# File 'lib/twilio-ruby/framework/rest/error.rb', line 40

def user_error
  @user_error
end

Instance Method Details

#to_sObject



50
51
52
# File 'lib/twilio-ruby/framework/rest/error.rb', line 50

def to_s
  message
end