Exception: CampactUserService::ResponseError
- Inherits:
-
StandardError
- Object
- StandardError
- CampactUserService::ResponseError
- Defined in:
- lib/campact_user_service/response_error.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(status_code, body) ⇒ ResponseError
constructor
A new instance of ResponseError.
Constructor Details
#initialize(status_code, body) ⇒ ResponseError
Returns a new instance of ResponseError.
5 6 7 8 9 |
# File 'lib/campact_user_service/response_error.rb', line 5 def initialize(status_code, body) super("Response error. Status code: #{status_code} - Body: #{body}") @status_code = status_code @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
3 4 5 |
# File 'lib/campact_user_service/response_error.rb', line 3 def body @body end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
3 4 5 |
# File 'lib/campact_user_service/response_error.rb', line 3 def status_code @status_code end |