NAME

Async::Redis::Error::Redis - Redis server error exception

DESCRIPTION

Thrown when Redis returns an error response (RESP type '-').

METHODS

from_message($message)

Class method to create error from Redis error message, parsing the error type from the message prefix.

my $error = Async::Redis::Error::Redis->from_message(
    'WRONGTYPE Operation against key holding wrong type'
);
say $error->type;  # 'WRONGTYPE'

Predicates

is_wrongtype - Key holds wrong type for operation
is_oom - Out of memory
is_busy - Server busy (Lua script running)
is_noscript - Script SHA not found
is_readonly - Write on read-only replica
is_loading - Server still loading dataset
is_noauth - Authentication required
is_noperm - ACL permission denied
is_fatal - Error is deterministic, retry won't help
is_transient - Error may succeed on retry