Exception: Sink::HTTP::ResponseError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message:, response:, body:) ⇒ ResponseError

Returns a new instance of ResponseError.



354
355
356
357
358
359
# File 'lib/sink/base_client.rb', line 354

def initialize(message:, response:, body:)
  super(message)
  @response = response
  @body = body
  @code = response.code.to_i
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



348
349
350
# File 'lib/sink/base_client.rb', line 348

def body
  @body
end

#codeObject (readonly)

Returns the value of attribute code.



352
353
354
# File 'lib/sink/base_client.rb', line 352

def code
  @code
end

#responseObject (readonly)

Returns the value of attribute response.



348
349
350
# File 'lib/sink/base_client.rb', line 348

def response
  @response
end