Skip to main content

nominal_api/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)]
18#[serde(crate = "conjure_object::serde")]
19#[conjure_object::private::staged_builder::staged_builder]
20#[builder(crate = conjure_object::private::staged_builder, update, inline)]
21pub struct SandboxTokenUnavailable {}
22impl SandboxTokenUnavailable {
23    /// Constructs a new instance of the type.
24    #[inline]
25    pub fn new() -> Self {
26        Self::builder().build()
27    }
28}
29impl conjure_error::ErrorType for SandboxTokenUnavailable {
30    #[inline]
31    fn code() -> conjure_error::ErrorCode {
32        conjure_error::ErrorCode::PermissionDenied
33    }
34    #[inline]
35    fn name() -> &'static str {
36        "Authorization:SandboxTokenUnavailable"
37    }
38    #[inline]
39    fn safe_args() -> &'static [&'static str] {
40        &[]
41    }
42}