Enum cedar_policy_core::est::FromJsonError
source · pub enum FromJsonError {
JsonDeserializationError(JsonDeserializationError),
TemplateToPolicy(UnexpectedSlotError),
InvalidSlotName,
ActionSlot,
MissingOperator,
MultipleOperators {
ops: Vec<SmolStr>,
},
MultiplicationByNonConstant {
arg1: Expr,
arg2: Expr,
},
UnescapeError(Vec<UnescapeError>),
InvalidEntityType(ParseErrors),
}
Expand description
Errors arising while converting a policy from its JSON representation (aka EST) into an AST
Variants§
JsonDeserializationError(JsonDeserializationError)
Error while deserializing JSON
TemplateToPolicy(UnexpectedSlotError)
Tried to convert an EST representing a template to an AST representing a static policy
InvalidSlotName
Slot name was not valid for the position it was used in. (Currently, principal slots must
be named ?principal
, and resource slots must be named ?resource
.)
ActionSlot
EST contained a template slot for action
. This is not currently allowed
MissingOperator
EST contained the empty JSON object {}
where a key (operator) was expected
MultipleOperators
EST contained an object with multiple keys (operators) where a single operator was expected
MultiplicationByNonConstant
At most one of the operands in a * b * c * d * ...
can be a non-{constant int}
UnescapeError(Vec<UnescapeError>)
Error thrown while processing string escapes
InvalidEntityType(ParseErrors)
Error reported when the entity type tested by an is
expression cannot be parsed.