Exception: Momento::Error::InvalidArgumentError

Inherits:
ArgumentError
  • Object
show all
Includes:
Momento::Error
Defined in:
lib/momento/error/types.rb

Overview

Invalid argument passed to Momento client

Instance Attribute Summary collapse

Attributes included from Momento::Error

#cause, #context, #transport_details

Instance Method Summary collapse

Methods included from Momento::Error

#to_s

Constructor Details

#initialize(details = "") ⇒ InvalidArgumentError

Returns a new instance of InvalidArgumentError.



129
130
131
132
# File 'lib/momento/error/types.rb', line 129

def initialize(details = "")
  @details = details
  super(message)
end

Instance Attribute Details

#detailsObject (readonly)

Returns the value of attribute details.



139
140
141
# File 'lib/momento/error/types.rb', line 139

def details
  @details
end

Instance Method Details

#error_codeSymbol

A Momento-specific code for the type of error.

Returns:

  • (Symbol)


135
136
137
# File 'lib/momento/error/types.rb', line 135

def error_code
  :INVALID_ARGUMENT_ERROR
end

#messageString

The error message.

Returns:

  • (String)


142
143
144
# File 'lib/momento/error/types.rb', line 142

def message
  "Invalid argument passed to Momento client: #{details}"
end