Exception: AgentAdmit::InvalidTokenError

Inherits:
Error
  • Object
show all
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

Instance Method Summary collapse

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(message = "Invalid access token", code: "invalid_token")
  super(message)
  @code = code
end

Instance Attribute Details

#codeString (readonly)

Returns machine-readable error code.

Returns:

  • (String)

    machine-readable error code



15
16
17
# File 'lib/agentadmit.rb', line 15

def code
  @code
end