Exception: HumanError::Errors::InvalidTokenError

Inherits:
RequestError
  • Object
show all
Includes:
AuthenticationError
Defined in:
lib/human_error/errors/authentication_errors/invalid_token_error.rb

Instance Attribute Summary collapse

Attributes included from HumanError::Error

#api_error_documentation_url, #api_version, #code, #knowledgebase_article_id, #knowledgebase_url, #message

Instance Method Summary collapse

Methods inherited from RequestError

#as_json

Methods included from HumanError::Error

#customer_support_uri, #developer_documentation_uri, 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

#developer_detailsObject



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

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

#developer_messageObject



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

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

#friendly_messageObject



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

def friendly_message
  'Sorry! You are not authorized to view this.'
end

#http_statusObject



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

def http_status
  401
end