ReferenceErrors
POLICY_INVALID
The policy document failed schema or semantic validation.
What it means
PolicyValidationError (code: POLICY_INVALID). definePolicy / compile rejected the document. path points at the offending key.
Message shape
<reason> → https://tailrace.dev/docs/reference/errors/POLICY_INVALIDCommon causes
- Unknown action string.
detokenizeunder a non-egress boundary key.- Invalid
formaton an entity rule.
Fixes
- Validate against Policy schema /
https://tailrace.dev/schema/policy.v1.json. - Put
detokenizeonly underegress:*boundary keys. - Use
allow|mask|tokenize|block(andreviewonly when you acceptNOT_IMPLEMENTED).
Safe to catch?
Usually at startup / config load. Fail closed - do not run with an invalid policy.