Errors
422 - semantically invalid manifest
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.
- Read the rejected ruleIdentify the missing target or incompatible definition.
- Compare both schemasCheck source and target names, types and keys.
- Fix dependencies and fieldsRegister prerequisites and correct the relation definition.
- 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"
TOMLRead the response
{
"error": "invalid_manifest",
"message": "foreign key target 'shop.customers.missing_pk' does not exist",
"retry": false
}Fix the request
- Read the referenced schema and field names in the error.
- Inspect both source and target definitions.
- Register dependencies and correct the relationship.
- 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_keyarray, such asprimary_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 currentexpression.
Continue
See error handling and retries, or return to error examples.