Exception: HumanError::Errors::InvalidTokenError

Inherits:
RuntimeError
  • Object
show all
Includes:
HumanError::Error, AuthenticationError
Defined in:
lib/human_error/errors/authentication_errors/invalid_token_error.rb

Instance Attribute Summary collapse

Attributes included from HumanError::Error

#code, #developer_documentation_url, #external_documentation_url, #id, #message

Instance Method Summary collapse

Methods included from HumanError::Error

#as_json, included, #initialize, #to_json, #to_s

Instance Attribute Details

#authentication_tokenObject

Returns the value of attribute authentication_token.



9
10
11
# File 'lib/human_error/errors/authentication_errors/invalid_token_error.rb', line 9

def authentication_token
  @authentication_token
end

Instance Method Details

#detailObject



19
20
21
22
# File 'lib/human_error/errors/authentication_errors/invalid_token_error.rb', line 19

def detail
  'The token you attempted to use for this request is invalid for this resource.  ' \
  'Please double-check and try again.'
end

#http_statusObject



11
12
13
# File 'lib/human_error/errors/authentication_errors/invalid_token_error.rb', line 11

def http_status
  401
end

#sourceObject



24
25
26
# File 'lib/human_error/errors/authentication_errors/invalid_token_error.rb', line 24

def source
  { token: '[FILTERED]' }
end

#titleObject



15
16
17
# File 'lib/human_error/errors/authentication_errors/invalid_token_error.rb', line 15

def title
  'Invalid Token'
end