Raised by LetMe.Policy.authorize!/4 if a request is unauthorized.
Summary
Functions
Returns an error struct with the given message and without an expression.
Types
@type t() :: %LetMe.UnauthorizedError{ __exception__: term(), expression: Spek.expression() | nil, message: String.t() }
Struct returned or raised if an authorization check fails.
expression contains the parts of the policy expression that were evaluated
and their results. Checks are evaluated lazily. The evaluation order follows
the expression as Spek.optimize/1 rewrote it at compile time, which is not
the order the allow/1 and deny/1 calls were written in.
The expression reflects the checks until a decision is made, but it does not reflect the complete authorization policy.