Exception: Bandwidth::InvalidRequestException
- Inherits:
-
APIException
- Object
- StandardError
- APIException
- Bandwidth::InvalidRequestException
- Defined in:
- lib/bandwidth/two_factor_auth_lib/two_factor_auth/exceptions/invalid_request_exception.rb
Overview
InvalidRequest class.
Instance Attribute Summary collapse
-
#result ⇒ String
An error message pertaining to what the issue could be.
Attributes inherited from APIException
Instance Method Summary collapse
-
#initialize(reason, response) ⇒ InvalidRequestException
constructor
The constructor.
-
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash.
Constructor Details
#initialize(reason, response) ⇒ InvalidRequestException
The constructor.
16 17 18 19 20 |
# File 'lib/bandwidth/two_factor_auth_lib/two_factor_auth/exceptions/invalid_request_exception.rb', line 16 def initialize(reason, response) super(reason, response) hash = APIHelper.json_deserialize(@response.raw_body) unbox(hash) end |
Instance Attribute Details
#result ⇒ String
An error message pertaining to what the issue could be
11 12 13 |
# File 'lib/bandwidth/two_factor_auth_lib/two_factor_auth/exceptions/invalid_request_exception.rb', line 11 def result @result end |
Instance Method Details
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash. response body.
25 26 27 |
# File 'lib/bandwidth/two_factor_auth_lib/two_factor_auth/exceptions/invalid_request_exception.rb', line 25 def unbox(hash) @result = hash['result'] end |