forked from modcrafter77/hyperspot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.rs
More file actions
28 lines (22 loc) · 841 Bytes
/
error.rs
File metadata and controls
28 lines (22 loc) · 841 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//! Error types for the `AuthN` resolver module.
use thiserror::Error;
/// Errors that can occur when using the `AuthN` resolver API.
#[derive(Debug, Error)]
pub enum AuthNResolverError {
/// The token is invalid, expired, or malformed.
#[error("unauthorized: {0}")]
Unauthorized(String),
/// No `AuthN` plugin is available to handle the request.
#[error("no plugin available")]
NoPluginAvailable,
/// The plugin is not available yet.
#[error("service unavailable: {0}")]
ServiceUnavailable(String),
/// Client credentials exchange failed (e.g., invalid credentials,
/// `IdP` unreachable, token endpoint error).
#[error("token acquisition failed: {0}")]
TokenAcquisitionFailed(String),
/// An internal error occurred.
#[error("internal error: {0}")]
Internal(String),
}