Exception: MHV::UserAccount::Errors::MHVClientError
- Inherits:
-
UserAccountError
- Object
- StandardError
- UserAccountError
- MHV::UserAccount::Errors::MHVClientError
- Defined in:
- app/services/mhv/user_account/errors.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(message, body = nil) ⇒ MHVClientError
constructor
A new instance of MHVClientError.
Methods inherited from UserAccountError
Constructor Details
#initialize(message, body = nil) ⇒ MHVClientError
Returns a new instance of MHVClientError.
25 26 27 28 |
# File 'app/services/mhv/user_account/errors.rb', line 25 def initialize(, body = nil) super() @body = body end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
23 24 25 |
# File 'app/services/mhv/user_account/errors.rb', line 23 def body @body end |
Instance Method Details
#as_json ⇒ Object
30 31 32 |
# File 'app/services/mhv/user_account/errors.rb', line 30 def as_json [{ title: , detail: body[:message], code: body[:errorCode] }] end |