Raised, or returned in an {:error, _} tuple, when a key does not exist
in the cache.
The cache ran the command, but the requested key was missing or expired.
Exception fields
See t/0.
Error reasons
The :reason field can be one of:
:not_found- the key doesn't exist in the cache.:expired- the key doesn't exist in the cache because it expired.
Summary
Types
@type t() :: %Nebulex.KeyError{ __exception__: term(), key: any(), metadata: keyword(), reason: atom() }
The type for this exception struct.
This exception has the following public fields:
:reason- the error reason. The two possible reasons are:not_foundor:expired. Defaults to:not_found.:key- the requested key.:metadata- the options given to the exception, minus:reasonand:key. For example,raise Nebulex.KeyError, key: :test, foo: :bargives the metadata[foo: :bar].