Exception: Langsmith::Client::APIError
- Defined in:
- lib/langsmith/client.rb
Overview
Raised when API requests fail.
Instance Attribute Summary collapse
-
#response_body ⇒ Hash, ...
readonly
Response body.
-
#status_code ⇒ Integer?
readonly
HTTP status code.
Instance Method Summary collapse
-
#initialize(message, status_code: nil, response_body: nil) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(message, status_code: nil, response_body: nil) ⇒ APIError
Returns a new instance of APIError.
23 24 25 26 27 |
# File 'lib/langsmith/client.rb', line 23 def initialize(, status_code: nil, response_body: nil) super() @status_code = status_code @response_body = response_body end |
Instance Attribute Details
#response_body ⇒ Hash, ... (readonly)
Returns response body.
18 19 20 |
# File 'lib/langsmith/client.rb', line 18 def response_body @response_body end |
#status_code ⇒ Integer? (readonly)
Returns HTTP status code.
15 16 17 |
# File 'lib/langsmith/client.rb', line 15 def status_code @status_code end |