You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
"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
Note
Notice the age provided as a string in the 3rd record
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
Note
We are trying to create errors in returnDocumentResponses to see a status KO of the shape of the output
IN:
Out
💥
com.datastax.astra.client.exception.DataAPIException: [CLIENT_HTTP] - {"errors":[{"message":"Server failed: root cause: (java.util.NoSuchElementException) No value present","errorCode":"SERVER_UNHANDLED_ERROR"}]} (http:500)
The text was updated successfully, but these errors were encountered: