Exception: OpenAI::OpenAPIException
- Inherits:
-
StandardError
- Object
- StandardError
- OpenAI::OpenAPIException
- Defined in:
- lib/openai/exceptions/exception.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#param ⇒ Object
readonly
Returns the value of attribute param.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ OpenAPIException
constructor
A new instance of OpenAPIException.
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
#code ⇒ Object (readonly)
Returns the value of attribute code.
10 11 12 |
# File 'lib/openai/exceptions/exception.rb', line 10 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
4 5 6 |
# File 'lib/openai/exceptions/exception.rb', line 4 def @message end |
#param ⇒ Object (readonly)
Returns the value of attribute param.
8 9 10 |
# File 'lib/openai/exceptions/exception.rb', line 8 def param @param end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/openai/exceptions/exception.rb', line 6 def type @type end |