Exception: Passwordstate::HTTPError
- Inherits:
-
PasswordstateError
- Object
- RuntimeError
- PasswordstateError
- Passwordstate::HTTPError
- Defined in:
- lib/passwordstate/errors.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(code, errors = []) ⇒ HTTPError
constructor
A new instance of HTTPError.
Constructor Details
#initialize(code, errors = []) ⇒ HTTPError
7 8 9 10 11 12 13 14 15 |
# File 'lib/passwordstate/errors.rb', line 7 def initialize(code, errors = []) @code = code.to_i @errors = errors super <<-ERRMSG Passwordstate responded with an error to the request; #{errors.map { |err| err['message'] || err['phrase'] }.join(', ')} ERRMSG end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/passwordstate/errors.rb', line 5 def code @code end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
5 6 7 |
# File 'lib/passwordstate/errors.rb', line 5 def errors @errors end |