Exception: Seam::Http::ApiError
- Inherits:
-
StandardError
- Object
- StandardError
- Seam::Http::ApiError
- Defined in:
- lib/seam/http.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(error, status_code, request_id) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(error, status_code, request_id) ⇒ ApiError
23 24 25 26 27 28 29 |
# File 'lib/seam/http.rb', line 23 def initialize(error, status_code, request_id) super(error[:message]) @code = error[:type] @status_code = status_code @request_id = request_id @data = error[:data] end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
21 22 23 |
# File 'lib/seam/http.rb', line 21 def code @code end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
21 22 23 |
# File 'lib/seam/http.rb', line 21 def data @data end |
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
21 22 23 |
# File 'lib/seam/http.rb', line 21 def request_id @request_id end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
21 22 23 |
# File 'lib/seam/http.rb', line 21 def status_code @status_code end |