Skip to content

Compile errors

You sent a schema to POST /v1/schemas/validate or POST /v1/extractions and got back a code starting with E-. Each error tells you three things: a stable code you can look up below, a JSON pointer to the part of the schema at fault, and for expressions, where in the expression string the problem is. Rely on the code, not the message, which may change.

{
"error": {
"code": "invalid_request",
"message": "The schema does not compile.",
"details": [
{ "code": "E-ENUM-VALUE", "message": "\"cancelled\" is not a value of this enum", "pointer": "/relations/2/expr", "span": [10, 21] }
]
}
}

Here pointer says the problem is in the expression of the third relation, and span is the [start, end) byte range inside that expression: characters 10 to 21 of status == 'cancelled' are 'cancelled', a label the enum doesn’t have.

Code Meaning Example
E-JSON-SYNTAX Not valid JSON, or nested deeper than 64 levels. {"hydra_schema":
E-JSON-DUPKEY An object has the same key twice. {"name": "a", "name": "b"}
E-JSON-NUMBER A number is not representable. "scale": 1.5
E-SCHEMA-VERSION Unsupported hydra_schema. "hydra_schema": "9.9"
E-SCHEMA-UNKNOWN-KEY A key the schema language does not define. "colour": "red"
E-SCHEMA-MISSING-KEY A required key is absent. a field without "type"
E-SCHEMA-TYPE Wrong JSON type. "nullable": "yes"
E-SCHEMA-VALUE Right JSON type, value not allowed (including invalid patterns and keys on the wrong field type). "scale": 40, "eom": "sometimes"
E-FIELD-DUP Two fields share a name. two fields named "a"
E-FIELD-NAME A field name is malformed or reserved. "name": "when"
E-REL-DUP Two relations share an id. two relations with "id": "r"
E-RANGE A range bound does not fit the type, does not parse, or min > max. {"min": 10, "max": 1}
E-LIMIT An input limit is exceeded; see limits.
Code Meaning Example
E-EXPR-SYNTAX The expression does not parse. startDate <
E-EXPR-FUNC Unknown function. foo(x)
E-EXPR-ARITY Wrong number of arguments. round(x)
E-EXPR-LITERAL Malformed literal. date'2027-13-45'
E-EXPR-DEPTH Nested more than 64 levels. 200 nested parentheses
E-EXPR-LENGTH Longer than 16 KiB.
Code Meaning Example
E-NAME-UNKNOWN Not a field name. nope == 1
E-ARRAY-RELATION An array field in a relation or applicable_when. tags == 'a'
E-ENUM-VALUE String is not one of the enum’s values. status == 'bogus'
E-TYPE Operand types do not fit the operator. startDate < rate
E-CURRENCY Money of different currencies combined or compared. eur == usd
E-BASIS Duration bases disagree, a literal does not fit its basis, or the wrong basis for a date or datetime. calendarDur < daysDur
E-DIV-UNROUNDED / outside the first argument of round. rate / 2 == x
E-ROUND-ARG round scale is not a literal from 0 to 28, or an unknown mode. round(x, 40)
E-WHEN-NESTED when that is not outermost, or inside applicable_when. not when(a, b)
E-REL-TYPE A relation is not true/false. startDate + duration
E-APPLICABLE-TYPE applicable_when is not true/false. startDate + duration
E-APPLICABLE-SELF applicable_when mentions its own field.
E-APPLICABLE-CYCLE applicable_when conditions refer to each other in a cycle. a when b, b when a
Code Meaning Example
E-CONST A constant part cannot be evaluated: division by zero, overflow, a date out of range. rate == round(1 / 0, 2)
E-REL-FALSE A relation can never be true. 1 == 2
W-REL-TRIVIAL Warning: a relation is always true (or its when condition never is) and is dropped. 1 == 1
Input Limit Error
Schema JSON 1 MiB E-LIMIT
Fields 32 per schema on the API 400 invalid_request
Relations 10,000 E-LIMIT
JSON nesting 64 levels E-JSON-SYNTAX
Expression 16 KiB, 64 levels deep E-EXPR-LENGTH, E-EXPR-DEPTH
Document 50,000 characters on the API 400 invalid_request
Registers per relation 255 (very large expressions) E-LIMIT