Exception: Twilio::REST::RestError
- Inherits:
-
TwilioError
- Object
- StandardError
- TwilioError
- Twilio::REST::RestError
- Defined in:
- lib/twilio-ruby/framework/error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Attributes inherited from TwilioError
Instance Method Summary collapse
-
#initialize(message, code, status_code) ⇒ RestError
constructor
A new instance of RestError.
- #to_s ⇒ Object
Constructor Details
#initialize(message, code, status_code) ⇒ RestError
Returns a new instance of RestError.
19 20 21 22 23 |
# File 'lib/twilio-ruby/framework/error.rb', line 19 def initialize(, code, status_code) @message = @code = code @status_code = status_code end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
17 18 19 |
# File 'lib/twilio-ruby/framework/error.rb', line 17 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
17 18 19 |
# File 'lib/twilio-ruby/framework/error.rb', line 17 def @message end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
17 18 19 |
# File 'lib/twilio-ruby/framework/error.rb', line 17 def status_code @status_code end |
Instance Method Details
#to_s ⇒ Object
25 26 27 |
# File 'lib/twilio-ruby/framework/error.rb', line 25 def to_s "[HTTP #{status_code}] #{code} : #{}" end |