Exception: Spacy::LLMClientBase::APIError
- Inherits:
-
StandardError
- Object
- StandardError
- Spacy::LLMClientBase::APIError
- Defined in:
- lib/ruby-spacy/llm_client_base.rb
Overview
Raised when an LLM API request fails after retries; carries the HTTP status code and the parsed response body when available.
Instance Attribute Summary collapse
-
#response_body ⇒ Object
readonly
Returns the value of attribute response_body.
-
#status_code ⇒ Object
readonly
Returns the value of attribute 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.
25 26 27 28 29 |
# File 'lib/ruby-spacy/llm_client_base.rb', line 25 def initialize(, status_code: nil, response_body: nil) @status_code = status_code @response_body = response_body super() end |
Instance Attribute Details
#response_body ⇒ Object (readonly)
Returns the value of attribute response_body.
23 24 25 |
# File 'lib/ruby-spacy/llm_client_base.rb', line 23 def response_body @response_body end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
23 24 25 |
# File 'lib/ruby-spacy/llm_client_base.rb', line 23 def status_code @status_code end |