authz_resolver_sdk/error.rs
1//! Error types for the `AuthZ` resolver module.
2
3use thiserror::Error;
4
5/// Errors that can occur when using the `AuthZ` resolver API.
6///
7/// These represent infrastructure/transport failures only.
8/// Access denial is expressed via `EvaluationResponse.decision == false`,
9/// not as an error variant.
10#[derive(Debug, Error)]
11pub enum AuthZResolverError {
12 /// No `AuthZ` plugin is available to handle the request.
13 #[error("no plugin available")]
14 NoPluginAvailable,
15
16 /// The plugin is not available yet.
17 #[error("service unavailable: {0}")]
18 ServiceUnavailable(String),
19
20 /// An internal error occurred.
21 #[error("internal error: {0}")]
22 Internal(String),
23}