Skip to main content

nominal_api/conjure/errors/persistent/compute/api/
nats_streaming_unavailable.rs

1/// The NATS-backed streaming transport became unavailable while running a streaming compute subscription.
2/// This can happen during a NATS pod rollout after the streaming compute restart budget is exhausted.
3/// Clients may retry by recreating the subscription. This uses INTERNAL because custom Conjure errors in this
4/// API do not support an UNAVAILABLE code; consumers should branch on this error name rather than HTTP status.
5#[derive(
6    Debug,
7    Clone,
8    conjure_object::serde::Serialize,
9    conjure_object::serde::Deserialize,
10    PartialEq,
11    Eq,
12    PartialOrd,
13    Ord,
14    Hash,
15    Copy
16)]
17#[serde(crate = "conjure_object::serde")]
18#[conjure_object::private::staged_builder::staged_builder]
19#[builder(crate = conjure_object::private::staged_builder, update, inline)]
20pub struct NatsStreamingUnavailable {}
21impl NatsStreamingUnavailable {
22    /// Constructs a new instance of the type.
23    #[inline]
24    pub fn new() -> Self {
25        Self::builder().build()
26    }
27}
28impl conjure_error::ErrorType for NatsStreamingUnavailable {
29    #[inline]
30    fn code() -> conjure_error::ErrorCode {
31        conjure_error::ErrorCode::Internal
32    }
33    #[inline]
34    fn name() -> &'static str {
35        "PersistentCompute:NatsStreamingUnavailable"
36    }
37    #[inline]
38    fn safe_args() -> &'static [&'static str] {
39        &[]
40    }
41}