Exception: Chatrix::UserNotFoundError

Inherits:
NotFoundError show all
Defined in:
lib/chatrix/errors.rb

Overview

Raised when a user is not found.

Instance Attribute Summary collapse

Attributes inherited from ApiError

#api_message, #code, #error

Instance Method Summary collapse

Constructor Details

#initialize(username, error = {}) ⇒ UserNotFoundError

Initializes a new UserNotFoundError instance.

Parameters:

  • username (String)

    The user that wasn't found.

  • error (Hash) (defaults to: {})

    The error response from the server.



65
66
67
68
# File 'lib/chatrix/errors.rb', line 65

def initialize(username, error = {})
  super error
  @username = username
end

Instance Attribute Details

#usernameString (readonly)

Returns the name of the user that was not found.

Returns:

  • (String)

    the name of the user that was not found.



60
61
62
# File 'lib/chatrix/errors.rb', line 60

def username
  @username
end