Exception: OpenFec::ServerError
- Defined in:
- lib/open_fec/error.rb
Overview
Raised for 5xx HTTP responses.
Instance Attribute Summary collapse
-
#body ⇒ Hash, ...
readonly
Response body.
-
#status ⇒ Integer?
readonly
HTTP status code.
Instance Method Summary collapse
-
#initialize(message = nil, status: nil, body: nil) ⇒ ServerError
constructor
A new instance of ServerError.
Constructor Details
#initialize(message = nil, status: nil, body: nil) ⇒ ServerError
Returns a new instance of ServerError.
47 48 49 50 51 |
# File 'lib/open_fec/error.rb', line 47 def initialize( = nil, status: nil, body: nil) @status = status @body = body super( || "Server error HTTP #{status}") end |
Instance Attribute Details
#body ⇒ Hash, ... (readonly)
Returns response body.
42 43 44 |
# File 'lib/open_fec/error.rb', line 42 def body @body end |
#status ⇒ Integer? (readonly)
Returns HTTP status code.
40 41 42 |
# File 'lib/open_fec/error.rb', line 40 def status @status end |