#[non_exhaustive]pub enum PolicyError {
ParseError(String),
EvalError(String),
RequestValidationError(String),
ContextError(String),
EntityError(String),
InvalidFormat(String),
EntityAttrError(String),
PolicyStoreConfigError(String),
PolicyStoreRoutingError(String),
LabelConfigError(String),
}Expand description
Policy evaluation and validation errors.
Variants correspond to Cedar parse/eval errors and library validation
errors. Call sites attach human-friendly context where possible.
For example, EntityAttrError wraps attribute access failures.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ParseError(String)
Failed to parse Cedar policy text.
EvalError(String)
Error during policy evaluation.
RequestValidationError(String)
Request validation failed (invalid principals, resources, or actions).
ContextError(String)
Context creation error during request processing.
EntityError(String)
Error creating or manipulating Cedar entities.
InvalidFormat(String)
Invalid format for a Cedar construct (string parsing failure).
EntityAttrError(String)
Entity attribute evaluation or access error.
PolicyStoreConfigError(String)
A policy-store layout or policy assignment is invalid.
PolicyStoreRoutingError(String)
A request cannot be routed to exactly one configured policy store.
LabelConfigError(String)
A resource-labeling configuration violates the trusted-output contract.
Trait Implementations§
Source§impl Debug for PolicyError
impl Debug for PolicyError
Source§impl<'de> Deserialize<'de> for PolicyError
impl<'de> Deserialize<'de> for PolicyError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for PolicyError
impl Display for PolicyError
Source§impl Error for PolicyError
impl Error for PolicyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ContextCreationError> for PolicyError
impl From<ContextCreationError> for PolicyError
Source§fn from(err: ContextCreationError) -> Self
fn from(err: ContextCreationError) -> Self
Source§impl From<EntitiesError> for PolicyError
impl From<EntitiesError> for PolicyError
Source§fn from(err: EntitiesError) -> Self
fn from(err: EntitiesError) -> Self
Source§impl From<EntityAttrEvaluationError> for PolicyError
impl From<EntityAttrEvaluationError> for PolicyError
Source§fn from(err: EntityAttrEvaluationError) -> Self
fn from(err: EntityAttrEvaluationError) -> Self
Source§impl From<ParseErrors> for PolicyError
impl From<ParseErrors> for PolicyError
Source§fn from(err: ParseErrors) -> Self
fn from(err: ParseErrors) -> Self
Source§impl From<RequestValidationError> for PolicyError
impl From<RequestValidationError> for PolicyError
Source§fn from(err: RequestValidationError) -> Self
fn from(err: RequestValidationError) -> Self
Auto Trait Implementations§
impl Freeze for PolicyError
impl RefUnwindSafe for PolicyError
impl Send for PolicyError
impl Sync for PolicyError
impl Unpin for PolicyError
impl UnsafeUnpin for PolicyError
impl UnwindSafe for PolicyError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more