Exception: ServiceError
- Inherits:
-
StandardError
- Object
- StandardError
- ServiceError
- Defined in:
- lib/service_error.rb
Overview
API Response Error Class
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response, message = "Service responded with an error") ⇒ ServiceError
constructor
A new instance of ServiceError.
Constructor Details
#initialize(response, message = "Service responded with an error") ⇒ ServiceError
Returns a new instance of ServiceError.
6 7 8 9 10 |
# File 'lib/service_error.rb', line 6 def initialize(response, = "Service responded with an error") super() @code = response.code @response = response end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/service_error.rb', line 5 def code @code end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
5 6 7 |
# File 'lib/service_error.rb', line 5 def response @response end |