Exception: Deepseek::ApiError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/deepseek-ruby/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, body) ⇒ ApiError

Returns a new instance of ApiError.



79
80
81
82
83
# File 'lib/deepseek-ruby/client.rb', line 79

def initialize(status, body)
  @status = status
  @body = body
  super("API Error: #{status} - #{body}")
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



77
78
79
# File 'lib/deepseek-ruby/client.rb', line 77

def body
  @body
end

#statusObject (readonly)

Returns the value of attribute status.



77
78
79
# File 'lib/deepseek-ruby/client.rb', line 77

def status
  @status
end