Exception: Leadtune::LeadtuneError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Leadtune::LeadtuneError
- Defined in:
- lib/leadtune.rb
Overview
Raised when non-2XX responses are received.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
HTTP status code.
-
#message ⇒ Object
readonly
Any body text included with the response.
Instance Method Summary collapse
-
#initialize(code, message) ⇒ LeadtuneError
constructor
A new instance of LeadtuneError.
-
#to_s ⇒ Object
:nodoc:.
Constructor Details
#initialize(code, message) ⇒ LeadtuneError
Returns a new instance of LeadtuneError.
24 25 26 |
# File 'lib/leadtune.rb', line 24 def initialize(code, ) @code, @message = code, end |
Instance Attribute Details
#code ⇒ Object (readonly)
HTTP status code
19 20 21 |
# File 'lib/leadtune.rb', line 19 def code @code end |
#message ⇒ Object (readonly)
Any body text included with the response
22 23 24 |
# File 'lib/leadtune.rb', line 22 def @message end |
Instance Method Details
#to_s ⇒ Object
:nodoc:
28 29 30 |
# File 'lib/leadtune.rb', line 28 def to_s #:nodoc: "#{@code} #{}" end |