Exception: Chatrix::AvatarNotFoundError

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

Overview

Raised when a user's avatar is not found.

Instance Attribute Summary collapse

Attributes inherited from ApiError

#api_message, #code, #error

Instance Method Summary collapse

Constructor Details

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

Initializes a new AvatarNotFoundError instance.

Parameters:

  • username (String)

    Name of the user whose avatar was not found.

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

    The error response from the server.



79
80
81
82
# File 'lib/chatrix/errors.rb', line 79

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

Instance Attribute Details

#usernameString (readonly)

Returns the user whose avatar was not found.

Returns:

  • (String)

    the user whose avatar was not found.



74
75
76
# File 'lib/chatrix/errors.rb', line 74

def username
  @username
end