Exception: Sqreen::Kit::HttpClient::UnexpectedStatusError
- Inherits:
-
StandardError
- Object
- StandardError
- Sqreen::Kit::HttpClient::UnexpectedStatusError
- Defined in:
- lib/sqreen/kit/http_client/unexpected_status_error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(code, body = nil) ⇒ UnexpectedStatusError
constructor
A new instance of UnexpectedStatusError.
- #message ⇒ Object
Constructor Details
#initialize(code, body = nil) ⇒ UnexpectedStatusError
Returns a new instance of UnexpectedStatusError.
12 13 14 15 |
# File 'lib/sqreen/kit/http_client/unexpected_status_error.rb', line 12 def initialize(code, body = nil) @code = code @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
10 11 12 |
# File 'lib/sqreen/kit/http_client/unexpected_status_error.rb', line 10 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
10 11 12 |
# File 'lib/sqreen/kit/http_client/unexpected_status_error.rb', line 10 def code @code end |
Instance Method Details
#message ⇒ Object
17 18 19 |
# File 'lib/sqreen/kit/http_client/unexpected_status_error.rb', line 17 def "Unexpected status #{code}: #{body}" end |