Exception: RubyPi::AuthenticationError
- Defined in:
- lib/ruby_pi/errors.rb
Overview
Raised when authentication fails (HTTP 401 or 403). Typically indicates an invalid, expired, or missing API key.
Instance Attribute Summary
Attributes inherited from ApiError
Instance Method Summary collapse
-
#initialize(message = nil, response_body: nil) ⇒ AuthenticationError
constructor
A new instance of AuthenticationError.
Constructor Details
#initialize(message = nil, response_body: nil) ⇒ AuthenticationError
Returns a new instance of AuthenticationError.
47 48 49 |
# File 'lib/ruby_pi/errors.rb', line 47 def initialize( = nil, response_body: nil) super( || "Authentication failed — check your API key", status_code: 401, response_body: response_body) end |