Exception: AgentSandbox::HttpError

Inherits:
Error
  • Object
show all
Defined in:
lib/agent_sandbox.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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(message || "HTTP #{status}: #{body.to_s[0, 500]}")
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



27
28
29
# File 'lib/agent_sandbox.rb', line 27

def body
  @body
end

#statusObject (readonly)

Returns the value of attribute status.



27
28
29
# File 'lib/agent_sandbox.rb', line 27

def status
  @status
end