Exception: AgentSandbox::HttpError
- Defined in:
- lib/agent_sandbox.rb
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(status:, body:, message: nil) ⇒ HttpError
constructor
A new instance of HttpError.
Constructor Details
#initialize(status:, body:, message: nil) ⇒ HttpError
Returns a new instance of HttpError.
28 29 30 31 32 |
# File 'lib/agent_sandbox.rb', line 28 def initialize(status:, body:, message: nil) @status = status @body = body super( || "HTTP #{status}: #{body.to_s[0, 500]}") end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
27 28 29 |
# File 'lib/agent_sandbox.rb', line 27 def body @body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
27 28 29 |
# File 'lib/agent_sandbox.rb', line 27 def status @status end |