Exception: HumanError::Errors::DuplicateAuthenticationError

Inherits:
RequestError
  • Object
show all
Includes:
AuthenticationError
Defined in:
lib/human_error/errors/authentication_errors/duplicate_authentication_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

#providerObject

Returns the value of attribute provider.



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

def provider
  @provider
end

#provider_user_idObject

Returns the value of attribute provider_user_id.



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

def provider_user_id
  @provider_user_id
end

#user_idObject

Returns the value of attribute user_id.



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

def user_id
  @user_id
end

Instance Method Details

#developer_detailsObject



23
24
25
26
27
28
29
# File 'lib/human_error/errors/authentication_errors/duplicate_authentication_error.rb', line 23

def developer_details
  {
    'provider'         => provider,
    'provider_user_id' => provider_user_id,
    'user_id'          => user_id,
  }
end

#developer_messageObject



17
18
19
20
21
# File 'lib/human_error/errors/authentication_errors/duplicate_authentication_error.rb', line 17

def developer_message
  'The authentication you attempted to register has already been registered by ' \
  'another user. We do not currently support allowing multiple users to be connected ' \
  'to the same authentication.'
end

#friendly_messageObject



31
32
33
# File 'lib/human_error/errors/authentication_errors/duplicate_authentication_error.rb', line 31

def friendly_message
  "Sorry! Someone else has already registered this #{provider} login."
end

#http_statusObject



13
14
15
# File 'lib/human_error/errors/authentication_errors/duplicate_authentication_error.rb', line 13

def http_status
  409
end