Exception: Hibp::HttpClient::RequestError
- Defined in:
- lib/hibp/http_client.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(method, path, status, body, options) ⇒ RequestError
constructor
A new instance of RequestError.
Constructor Details
#initialize(method, path, status, body, options) ⇒ RequestError
Returns a new instance of RequestError.
11 12 13 14 15 |
# File 'lib/hibp/http_client.rb', line 11 def initialize(method, path, status, body, ) @status = status @body = body super("#{method} to #{path} returned status #{status} - options: #{.inspect}") end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
9 10 11 |
# File 'lib/hibp/http_client.rb', line 9 def body @body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
9 10 11 |
# File 'lib/hibp/http_client.rb', line 9 def status @status end |