Predis\Connection\Cluster\RedisCluster::onErrorResponse PHP Метод

onErrorResponse() защищенный Метод

Handles -ERR responses returned by Redis.
protected onErrorResponse ( Predis\Command\CommandInterface $command, Predis\Response\ErrorInterface $error ) : mixed
$command Predis\Command\CommandInterface Command that generated the -ERR response.
$error Predis\Response\ErrorInterface Redis error response object.
Результат mixed
    protected function onErrorResponse(CommandInterface $command, ErrorResponseInterface $error)
    {
        $details = explode(' ', $error->getMessage(), 2);
        switch ($details[0]) {
            case 'MOVED':
                return $this->onMovedResponse($command, $details[1]);
            case 'ASK':
                return $this->onAskResponse($command, $details[1]);
            default:
                return $error;
        }
    }