Exception: HumanError::Errors::InvalidUsernameOrPasswordError

Inherits:
RuntimeError
  • Object
show all
Includes:
HumanError::Error, AuthenticationError
Defined in:
lib/human_error/errors/authentication_errors/invalid_username_or_password_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

#usernameObject

Returns the value of attribute username.



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

def username
  @username
end

Instance Method Details

#detailObject



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

def detail
  'Either the username or password passed in or this request is invalid.  Please ' \
  'double-check and try again.'
end

#http_statusObject



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

def http_status
  401
end

#sourceObject



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

def source
  { username: username, password: '[FILTERED]' }
end

#titleObject



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

def title
  'Invalid Username/Password'
end