Exception: Verikloak::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Verikloak::Error
- Defined in:
- lib/verikloak/errors.rb
Overview
Base error class for all Verikloak-related exceptions.
All errors raised by this library inherit from this class so they can be rescued in a consistent way. Each error may carry a short, programmatic ‘code` (e.g., “invalid_token”, “jwks_fetch_failed”) that middleware and callers can use to map to HTTP statuses or telemetry.
Direct Known Subclasses
DiscoveryError, JwksCacheError, MiddlewareError, TokenDecoderError
Instance Attribute Summary collapse
-
#code ⇒ String, ...
readonly
A short error code identifier suitable for programmatic handling.
Instance Method Summary collapse
-
#initialize(message = nil, code: nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message = nil, code: nil) ⇒ Error
Returns a new instance of Error.
21 22 23 24 |
# File 'lib/verikloak/errors.rb', line 21 def initialize( = nil, code: nil) super() @code = code end |
Instance Attribute Details
#code ⇒ String, ... (readonly)
A short error code identifier suitable for programmatic handling.
16 17 18 |
# File 'lib/verikloak/errors.rb', line 16 def code @code end |