Skip to main content

nominal_api_conjure/conjure/errors/authorization/
sandbox_token_unavailable.rs

1/// Returned by InternalSandboxTokenService when the endpoint cannot mint a
2/// token — either because no sandbox configuration is present on this
3/// gatekeeper instance, or because the shared-secret header is missing or
4/// does not match. The two cases are intentionally indistinguishable to
5/// callers.
6#[derive(
7    Debug,
8    Clone,
9    conjure_object::serde::Serialize,
10    conjure_object::serde::Deserialize,
11    PartialEq,
12    Eq,
13    PartialOrd,
14    Ord,
15    Hash,
16    Copy,
17    conjure_object::log_safety::derive::LogSafe
18)]
19#[serde(crate = "conjure_object::serde")]
20#[conjure_object::private::staged_builder::staged_builder]
21#[builder(crate = conjure_object::private::staged_builder, update, inline)]
22pub struct SandboxTokenUnavailable {}
23impl SandboxTokenUnavailable {
24    /// Constructs a new instance of the type.
25    #[inline]
26    pub fn new() -> Self {
27        Self::builder().build()
28    }
29}
30impl conjure_error::ErrorType for SandboxTokenUnavailable {
31    #[inline]
32    fn code() -> conjure_error::ErrorCode {
33        conjure_error::ErrorCode::PermissionDenied
34    }
35    #[inline]
36    fn name() -> &'static str {
37        "Authorization:SandboxTokenUnavailable"
38    }
39    #[inline]
40    fn safe_args() -> &'static [&'static str] {
41        &[]
42    }
43}