Exception: CFoundry::BadResponse
- Inherits:
-
StandardError
- Object
- StandardError
- CFoundry::BadResponse
- Defined in:
- lib/cfoundry/errors.rb
Overview
Exception raised when the response is unexpected; usually from a server error.
Instance Method Summary collapse
-
#initialize(code, body = nil) ⇒ BadResponse
constructor
Initialize, with the HTTP response code and body.
-
#to_s ⇒ Object
Exception message.
Constructor Details
#initialize(code, body = nil) ⇒ BadResponse
Initialize, with the HTTP response code and body.
96 97 98 99 |
# File 'lib/cfoundry/errors.rb', line 96 def initialize(code, body = nil) @code = code @body = body end |
Instance Method Details
#to_s ⇒ Object
Exception message.
102 103 104 |
# File 'lib/cfoundry/errors.rb', line 102 def to_s "target failed to handle our request due to an internal error (#{@code})" end |