Exception: Braintrust::HTTP::ResponseError
- Defined in:
- lib/braintrust/base_client.rb
Direct Known Subclasses
APIStatusError, AuthenticationError, BadRequestError, ConflictError, InternalServerError, NotFoundError, PermissionDeniedError, RateLimitError, UnprocessableEntityError
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(message:, response:, body:) ⇒ ResponseError
constructor
A new instance of ResponseError.
Constructor Details
#initialize(message:, response:, body:) ⇒ ResponseError
Returns a new instance of ResponseError.
333 334 335 336 337 338 |
# File 'lib/braintrust/base_client.rb', line 333 def initialize(message:, response:, body:) super() @response = response @body = body @code = response.code.to_i end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
331 332 333 |
# File 'lib/braintrust/base_client.rb', line 331 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
331 332 333 |
# File 'lib/braintrust/base_client.rb', line 331 def code @code end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
331 332 333 |
# File 'lib/braintrust/base_client.rb', line 331 def response @response end |