OriginChainDB
Errors

400 - column type mismatch

← Errors examples

What happened

A value does not match the type registered for its column. This can happen in a row write or a query filter.

Match a value to its column typeA quoted number is a string; the schema decides which value types are accepted.
  1. Read the expected typeFind the named column in the schema.
  2. Correct the valueSend the proper JSON type and valid range or dimensions.
  3. 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

  1. Read the expected type and column in the response.
  2. Check the registered schema.
  3. Convert the value to the required JSON type.
  4. 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.
  • null sent 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 timestamp column expects epoch milliseconds.
  • Vector dimension mismatch on an embedding column.
  • Boolean sent as "true" (string) instead of true (JSON literal).

Continue

See error handling and retries, or return to error examples.

© 2026 Silicoyn Technologies Pvt Ltd

On this page