Exception: GPT::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/gpt/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status: nil, headers: nil, response: nil) ⇒ Error

Returns a new instance of Error.



4
5
6
7
8
9
# File 'lib/gpt/error.rb', line 4

def initialize(message, status: nil, headers: nil, response: nil)
  super(message)
  @status = status
  @headers = headers
  @response = response
end

Instance Attribute Details

#headersObject (readonly)

Returns the value of attribute headers.



2
3
4
# File 'lib/gpt/error.rb', line 2

def headers
  @headers
end

#responseObject (readonly)

Returns the value of attribute response.



2
3
4
# File 'lib/gpt/error.rb', line 2

def response
  @response
end

#statusObject (readonly)

Returns the value of attribute status.



2
3
4
# File 'lib/gpt/error.rb', line 2

def status
  @status
end