Exception: RubyOpenrouter::APIError
- Defined in:
- lib/ruby_openrouter/error.rb
Direct Known Subclasses
AuthenticationError, BadRequestError, RateLimitError, ServerError
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message, status: nil, code: nil) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(message, status: nil, code: nil) ⇒ APIError
Returns a new instance of APIError.
9 10 11 12 13 |
# File 'lib/ruby_openrouter/error.rb', line 9 def initialize(, status: nil, code: nil) super() @status = status @code = code end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
7 8 9 |
# File 'lib/ruby_openrouter/error.rb', line 7 def code @code end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
7 8 9 |
# File 'lib/ruby_openrouter/error.rb', line 7 def status @status end |