Exception: RubyLLM::Ups::ApiError

Inherits:
Error
  • Object
show all
Defined in:
lib/ruby_llm/ups/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, status: nil, body: nil) ⇒ ApiError

Returns a new instance of ApiError.



11
12
13
14
15
# File 'lib/ruby_llm/ups/errors.rb', line 11

def initialize(message = nil, status: nil, body: nil)
  @status = status
  @body = body
  super(message || "API error (#{status})")
end

Instance Attribute Details

#body ⇒ Object (readonly)

Returns the value of attribute body.



9
10
11
# File 'lib/ruby_llm/ups/errors.rb', line 9

def body
  @body
end

#status ⇒ Object (readonly)

Returns the value of attribute status.



9
10
11
# File 'lib/ruby_llm/ups/errors.rb', line 9

def status
  @status
end