{
"status": {
"primaryKeySchema": {
"name": {
"type": "text"
},
"id": {
"type": "text"
}
},
"insertedIds": [
[
"John",
"Connor"
],
[
"Sara",
"Connor"
]
]
},
"errors": [
{
"stackTrace": [],
"message": "Only values that are supported by the column data type can be included when inserting a document into a table.\n\nThe table default_keyspace.table_composite_pk defines the columns: id(text), name(text), age(int).\nThe request included the following columns that had values that are invalid: age: Error trying to convert to targetCQLType `INT` from value.class `java.lang.String`, value \"50\". Root cause: no codec matching value type.\n\nResend the request using only supported column values.",
"errorCode": "INVALID_COLUMN_VALUES",
"errorMessage": "(INVALID_COLUMN_VALUES) Only values that are supported by the column data type can be included when inserting a document into a table.\n\nThe table default_keyspace.table_composite_pk defines the columns: id(text), name(text), age(int).\nThe request included the following columns that had values that are invalid: age: Error trying to convert to targetCQLType `INT` from value.class `java.lang.String`, value \"50\". Root cause: no codec matching value type.\n\nResend the request using only supported column values.",
"suppressed": [],
"localizedMessage": "Only values that are supported by the column data type can be included when inserting a document into a table.\n\nThe table default_keyspace.table_composite_pk defines the columns: id(text), name(text), age(int).\nThe request included the following columns that had values that are invalid: age: Error trying to convert to targetCQLType `INT` from value.class `java.lang.String`, value \"50\". Root cause: no codec matching value type.\n\nResend the request using only supported column values."
}
]
}
Given the Table:
1. Default insertion
IN
OUT
=> All good the
insertedIds
are populated2. Default insertion with invalid input
All good 2
insertedID
and an explicit error.3. Insertion with returnDocumentResponse flag
All good, you can notice out insertedids is empty replaced by
documentResponses
.4. Insertion with returnDocumentResponse flag and invalid input
IN:
Out
:boom: