OriginChainDB
Errors

422 - semantically invalid manifest

← Errors examples

What happened

The body has valid syntax, but its schema meaning is invalid. In this example a relationship refers to an incompatible or missing target definition.

Correct a schema that parses but is invalidValid syntax does not guarantee valid table relationships or matching column types.
  1. Read the rejected ruleIdentify the missing target or incompatible definition.
  2. Compare both schemasCheck source and target names, types and keys.
  3. Fix dependencies and fieldsRegister prerequisites and correct the relation definition.
  4. Validate the new submissionCheck that the corrected schema is accepted.

Request that triggers it

A manifest where a foreign key points at a column that doesn't exist on the target table.

curl -X POST "https://$OC_HOST/v1/tenants/$OC_TENANT/schemas" \
  -H "Authorization: Bearer $OC_TOKEN" \
  -H "Content-Type: application/toml" \
  --data-binary @- <<'TOML'
[table]
name = "shop.orders"

[[column]]
name = "id"
type = "string"
primary_key = true

[[column]]
name = "customer_id"
type = "string"

[[foreign_key]]
column = "customer_id"
references = "shop.customers.missing_pk"
TOML

Read the response

{
  "error": "invalid_manifest",
  "message": "foreign key target 'shop.customers.missing_pk' does not exist",
  "retry": false
}

Fix the request

  1. Read the referenced schema and field names in the error.
  2. Inspect both source and target definitions.
  3. Register dependencies and correct the relationship.
  4. Submit the corrected schema.

Keep in mind: Valid TOML or JSON alone does not prove that referenced fields and types are compatible.

Common causes

  • FK target table not registered yet (apply manifests in the right order).
  • Typo in the FK target column name.
  • The target key is missing from the table-level primary_key array, such as primary_key = ["id"].
  • Vector column's declared dim doesn't match the embedding model.
  • Two indexes with the same name on one table.
  • CHECK constraint with the field expr (legacy) instead of the current expression.

Continue

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

© 2026 Silicoyn Technologies Pvt Ltd

On this page