This section describes possible error messages you may encounter with extraction and how to resolve them.

Error: Only JSON schema version 2020-12 is supported. Invalid JSON Schema

This error occurs if the JSON schema is unsupported. only supports this schema version:

Error: Top-level schema must be of type ‘object’

This error occurs if the top-level element on the schema is not object. The top-level element of the schema must be object.

Correct:

{
  "title": "Invoice Schema",
  "description": "Schema for invoice extraction",
  "type": "object",
  "required": [
    "Account Number"
  ],
  "properties": {
    "Account Number": {
      "type": "string",
      "description": "Account Number"
    }
  }
}

Incorrect:

{
  "title": "Invoice Schema",
  "description": "Schema for invoice extraction",
  "type": "string",
  "required": [
    "Account Number"
  ],
  "properties": {
    "Account Number": {
      "type": "string",
      "description": "Account Number"
    }
  }
}

Error: Schema depth exceeds MAX_RECURSION_DEPTH at PATH

This error occurs when the schema has more than five nested levels. The extraction schema supports up to five nested levels.

Error: Type list definition at PATH cannot contain ‘object’ or ‘array’

This error occurs when a list in a schema contains an object or array. The extraction schema does not support lists that include objects or arrays.

Error: Keyword ‘KEY’ is not supported

This error occurs when a prohibited keyword is included in the schema. The extraction schema does not support these keywords:

  • allOf
  • not
  • dependentRequired
  • dependentSchemas
  • if
  • then
  • else

Error: Unsupported schema type

This error occurs when the schema type is not supported.

Error: Too many fields

The extraction schema can extract up to 30 fields.