Exception: Momento::Error::NotFoundError

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

Overview

A cache with the specified name does not exist.

Instance Attribute Summary

Attributes included from Momento::Error

#cause, #context, #details, #transport_details

Instance Method Summary collapse

Methods included from Momento::Error

#to_s

Instance Method Details

#error_codeSymbol

A Momento-specific code for the type of error.

Returns:

  • (Symbol)


167
168
169
# File 'lib/momento/error/types.rb', line 167

def error_code
  :NOT_FOUND_ERROR
end

#messageString

The error message.

Returns:

  • (String)


172
173
174
# File 'lib/momento/error/types.rb', line 172

def message
  "A cache with the specified name does not exist.  To resolve this error, make sure you have created the cache before attempting to use it.  Cache name: '#{context[:cache_name]}'"
end