Errors
400 - column type mismatch
What happened
A value does not match the type registered for its column. This can happen in a row write or a query filter.
- Read the expected typeFind the named column in the schema.
- Correct the valueSend the proper JSON type and valid range or dimensions.
- Verify the accepted writeCheck the response and stored value.
Request that triggers it
Putting a string into a numeric column. The older response below calls the type float64; use f64 when declaring it with the current schema field reference.
curl -X PUT "https://$OC_HOST/v1/tenants/$OC_TENANT/rows/shop.orders/o_42" \
-H "Authorization: Bearer $OC_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id": "o_42", "amount": "not-a-number", "status": "paid"}'Read the response
{
"error": "type_mismatch",
"message": "column 'amount' is float64; value 'not-a-number' is not a number",
"retry": false
}Fix the request
- Read the expected type and column in the response.
- Check the registered schema.
- Convert the value to the required JSON type.
- Send the corrected request.
Keep in mind: A quoted number is a string. Use the type names from your registered schema and current schema reference.
Common causes
- Form fields arriving as strings from HTML inputs without client-side parsing.
nullsent for a non-null column.- A number outside the declared integer range, or a negative value supplied for
u64. - A timestamp supplied in seconds when the
timestampcolumn expects epoch milliseconds. - Vector dimension mismatch on an embedding column.
- Boolean sent as
"true"(string) instead oftrue(JSON literal).
Continue
See error handling and retries, or return to error examples.