src/Response/Error.php
public function getData() {
		$this->_stream->offset(0);
		$data = [];
		$data['code'] = $this->_stream->readInt();

		switch($data['code']){
			case self::SERVER_ERROR:
				$data['message'] = "Server error: " . $this->_stream->readString();
				break;

			case self::PROTOCOL_ERROR:
				$data['message'] = "Protocol error: " . $this->_stream->readString();
				break;

			case self::BAD_CREDENTIALS:
				$data['message'] = "Bad credentials: " . $this->_stream->readString();
				break;

			case self::UNAVAILABLE_EXCEPTION:
				$data['message'] = "Unavailable exception. Error data: " . var_export([
                        'error'=>$this->_stream->readString(),
                        'consistency' => $this->_stream->readShort(),
                        'node' => $this->_stream->readInt(),
						'replica' => $this->_stream->readInt()
					], true);
				break;

			case self::OVERLOADED:
				$data['message'] = "Overloaded: " . $this->_stream->readString();
				break;

			case self::IS_BOOTSTRAPPING:
				$data['message'] = "Is_bootstrapping: " . $this->_stream->readString();
				break;

			case self::TRUNCATE_ERROR:
				$data['message'] = "Truncate_error: " . $this->_stream->readString();
				break;

			case self::WRITE_TIMEOUT:
				$data['message'] = "Write_timeout. Error data: " . var_export([
                        'error'=>$this->_stream->readString(),
                        'consistency' => $this->_stream->readShort(),
						'node' => $this->_stream->readInt(),
						'replica' => $this->_stream->readInt(),
						'writeType' => $this->_stream->readString()
					], true);
				break;

			case self::READ_TIMEOUT:
				$data['message'] = "Read_timeout. Error data: " . var_export([
                        'error'=>$this->_stream->readString(),
                        'consistency' => $this->_stream->readShort(),
						'node' => $this->_stream->readInt(),
						'replica' => $this->_stream->readInt(),
						'dataPresent' => $this->_stream->readChar()
					], true);
				break;

			case self::SYNTAX_ERROR:
				$data['message'] = "Syntax_error: " . $this->_stream->readString();
				break;

			case self::UNAUTHORIZED:
				$data['message'] = "Unauthorized: " . $this->_stream->readString();
				break;

			case self::INVALID:
				$data['message'] = "Invalid: " . $this->_stream->readString();
				break;

			case self::CONFIG_ERROR:
				$data['message'] = "Config_error: " . $this->_stream->readString();
				break;

			case self::ALREADY_EXIST:
				$data['message'] = "Already_exists: " . $this->_stream->readString();
				break;

			case self::UNPREPARED:
				$data['message'] = "Unprepared: " . $this->_stream->readShort();
				break;

			default:
				$data['message'] = 'Unknown error';
		}
		
		return $data;
	}
public function getData() {
		$this->_stream->offset(0);
		$data = [];
		$data['code'] = $this->_stream->readInt();

		switch($data['code']){
			case self::SERVER_ERROR:
				$data['message'] = "Server error: " . $this->_stream->readString();
				break;

			case self::PROTOCOL_ERROR:
				$data['message'] = "Protocol error: " . $this->_stream->readString();
				break;

			case self::BAD_CREDENTIALS:
				$data['message'] = "Bad credentials: " . $this->_stream->readString();
				break;

			case self::UNAVAILABLE_EXCEPTION:
				$data['message'] = "Unavailable exception. Error data: " . var_export([
                        'error'=>$this->_stream->readString(),
                        'consistency' => $this->_stream->readShort(),
                        'node' => $this->_stream->readInt(),
						'replica' => $this->_stream->readInt()
					], true);
				break;

			case self::OVERLOADED:
				$data['message'] = "Overloaded: " . $this->_stream->readString();
				break;

			case self::IS_BOOTSTRAPPING:
				$data['message'] = "Is_bootstrapping: " . $this->_stream->readString();
				break;

			case self::TRUNCATE_ERROR:
				$data['message'] = "Truncate_error: " . $this->_stream->readString();
				break;

			case self::WRITE_TIMEOUT:
				$data['message'] = "Write_timeout. Error data: " . var_export([
                        'error'=>$this->_stream->readString(),
                        'consistency' => $this->_stream->readShort(),
						'node' => $this->_stream->readInt(),
						'replica' => $this->_stream->readInt(),
						'writeType' => $this->_stream->readString()
					], true);
				break;

			case self::READ_TIMEOUT:
				$data['message'] = "Read_timeout. Error data: " . var_export([
                        'error'=>$this->_stream->readString(),
                        'consistency' => $this->_stream->readShort(),
						'node' => $this->_stream->readInt(),
						'replica' => $this->_stream->readInt(),
						'dataPresent' => $this->_stream->readChar()
					], true);
				break;

			case self::SYNTAX_ERROR:
				$data['message'] = "Syntax_error: " . $this->_stream->readString();
				break;

			case self::UNAUTHORIZED:
				$data['message'] = "Unauthorized: " . $this->_stream->readString();
				break;

			case self::INVALID:
				$data['message'] = "Invalid: " . $this->_stream->readString();
				break;

			case self::CONFIG_ERROR:
				$data['message'] = "Config_error: " . $this->_stream->readString();
				break;

			case self::ALREADY_EXIST:
				$data['message'] = "Already_exists: " . $this->_stream->readString();
				break;

			case self::UNPREPARED:
				$data['message'] = "Unprepared: " . $this->_stream->readShort();
				break;

			default:
				$data['message'] = 'Unknown error';
		}
		
		return $data;
	}
Indicates an error processing a request. The body of the message will be an
error code ([int]) followed by a [string] error message. Then, depending on
the exception, more content may follow. The error codes are defined in
Section 7, along with their additional content if any.

@return array