Exception: AgentAdmit::InvalidTokenError
- Defined in:
- lib/agentadmit.rb
Overview
Raised when token validation fails. #code carries the machine-readable reason from the API — one of VERIFY_ERROR_CODES (e.g. token_expired, connection_expired, environment_mismatch); unknown codes pass through.
Instance Attribute Summary collapse
-
#code ⇒ String
readonly
Machine-readable error code.
Instance Method Summary collapse
-
#initialize(message = "Invalid access token", code: "invalid_token") ⇒ InvalidTokenError
constructor
A new instance of InvalidTokenError.
Constructor Details
#initialize(message = "Invalid access token", code: "invalid_token") ⇒ InvalidTokenError
Returns a new instance of InvalidTokenError.
17 18 19 20 |
# File 'lib/agentadmit.rb', line 17 def initialize( = "Invalid access token", code: "invalid_token") super() @code = code end |
Instance Attribute Details
#code ⇒ String (readonly)
Returns machine-readable error code.
15 16 17 |
# File 'lib/agentadmit.rb', line 15 def code @code end |