When write timeout occurrs, Cassandra sends the error message "timed out...". Your code reads the first two bytes, interpreting them as number. Then it tries to get the error message of length 29801, throwing an exception.
This probably applies to some other error messages as well - not all of them return the length bytes.
When write timeout occurrs, Cassandra sends the error message "timed out...". Your code reads the first two bytes, interpreting them as number. Then it tries to get the error message of length 29801, throwing an exception.
This probably applies to some other error messages as well - not all of them return the length bytes.