Exception: VectorAmp::APIError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status: nil, body: nil, headers: {}) ⇒ APIError

Returns a new instance of APIError.



10
11
12
13
14
15
# File 'lib/vector_amp/error.rb', line 10

def initialize(message, status: nil, body: nil, headers: {})
  super(message)
  @status = status
  @body = body
  @headers = headers
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



8
9
10
# File 'lib/vector_amp/error.rb', line 8

def body
  @body
end

#headersObject (readonly)

Returns the value of attribute headers.



8
9
10
# File 'lib/vector_amp/error.rb', line 8

def headers
  @headers
end

#statusObject (readonly)

Returns the value of attribute status.



8
9
10
# File 'lib/vector_amp/error.rb', line 8

def status
  @status
end