Exception: VoyageAI::Client::RequestError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/voyageai/client.rb

Overview

An error raised for any HTTP issues.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response:) ⇒ RequestError

Returns a new instance of RequestError.

Parameters:

  • response (HTTP::Response)


11
12
13
14
# File 'lib/voyageai/client.rb', line 11

def initialize(response:)
  super("status=#{response.status} body=#{response.body}")
  @response = response
end

Instance Attribute Details

#responseObject

Returns the value of attribute response.



8
9
10
# File 'lib/voyageai/client.rb', line 8

def response
  @response
end