When trying to bind an incorrect parameter, the error message thrown by the driver is something like "Not enough bytes... " or "Too many bytes...", that is the actual error message from Cassandra.
For SimpleStatements, the driver cannot do much about it as it serializes the parameters "blindly". But for BoundStatements, we CAN as we have the prepared statement metadata (parameters information) and we can determine if the source and target type matches.
I've added a validation for the PreparedStatement.Bind method.
It is a lightweight validation (source types that for sure don't fit as target types) in order to avoid introducing breaking changes.
For example: If a user is sending byte[] through the driver with the correct serialization format, we should still do that.
I've also added a validation for amount of parameters validation because I the error message by Cassandra could be confusing for the user.