Exception: OpenAI::OpenAPIException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/openai/exceptions/exception.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ OpenAPIException

Returns a new instance of OpenAPIException.



12
13
14
15
16
# File 'lib/openai/exceptions/exception.rb', line 12

def initialize(attributes)
  attributes.each do |key, value|
    instance_variable_set("@#{key}", value)
  end
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



10
11
12
# File 'lib/openai/exceptions/exception.rb', line 10

def code
  @code
end

#messageObject (readonly)

Returns the value of attribute message.



4
5
6
# File 'lib/openai/exceptions/exception.rb', line 4

def message
  @message
end

#paramObject (readonly)

Returns the value of attribute param.



8
9
10
# File 'lib/openai/exceptions/exception.rb', line 8

def param
  @param
end

#typeObject (readonly)

Returns the value of attribute type.



6
7
8
# File 'lib/openai/exceptions/exception.rb', line 6

def type
  @type
end