Skip to main content

HiveErrorDetailV1

Struct HiveErrorDetailV1 

Source
pub struct HiveErrorDetailV1 {
Show 23 fields pub code: HiveErrorCode, pub message: String, pub retry_after_s: Option<u64>, pub limit: Option<u64>, pub used: Option<u64>, pub resource: Option<String>, pub reset_at: Option<String>, pub cooldown_days: Option<u32>, pub member: Option<String>, pub level: Option<String>, pub action: Option<String>, pub expected: Option<u64>, pub actual: Option<u64>, pub min_instance: Option<String>, pub kind: Option<HiveUploadKind>, pub reason: Option<String>, pub field: Option<String>, pub number: Option<u64>, pub check: Option<String>, pub role: Option<String>, pub agent_role: Option<String>, pub feature: Option<String>, pub plan_needed: Option<String>,
}
Expand description

The error object.

Fields§

§code: HiveErrorCode§message: String

Human-readable, safe to show; never contains secrets or tokens.

§retry_after_s: Option<u64>§limit: Option<u64>

instance_limit: seats in the plan; quota_exceeded: the quota (bytes for transfer_bytes, so wider than 32 bits).

§used: Option<u64>

instance_limit: seats in use; quota_exceeded: what is used.

§resource: Option<String>

quota_exceeded: the quota (registered_instances, private_vaults, transfer_bytes, bus_messages, or one a newer Hive adds).

§reset_at: Option<String>

quota_exceeded: when it frees (RFC 3339; null when nothing frees by itself).

§cooldown_days: Option<u32>

quota_exceeded registered_instances: the Personal slot cool-down.

§member: Option<String>

policy_denied: the dotted member path that refused.

§level: Option<String>

policy_denied: the outermost level whose document refuses.

§action: Option<String>

policy_denied of consent_required_for: the action.

§expected: Option<u64>

revision_conflict: revision the client expected.

§actual: Option<u64>

revision_conflict: current revision.

§min_instance: Option<String>

upgrade_required: lowest engine version accepted.

§kind: Option<HiveUploadKind>

upload_disabled: which upload the organization switched off.

§reason: Option<String>

1.5: machine-readable detail of the code ([a-z_], ≤ 64), e.g. required.

§field: Option<String>

1.5: the request field the error is about (invalid_request).

§number: Option<u64>

1.6: the proposal an error is about (proposal_state, not_found).

§check: Option<String>

not_permitted (Hive task #17): the check that failed, presence (the agent has no live presence on the bus) or role (present in another role).

§role: Option<String>

not_permitted: the task’s role.

§agent_role: Option<String>

not_permitted with check: role: the role the agent is present in.

§feature: Option<String>

2.x plan_required: the feature the plan lacks (repos, internal_vaults, …; absent from a 1.x Hive, where it means Hive itself). limit/used carry a counted feature’s numbers. feature_disabled: the feature switched off on this Hive (instance_metrics).

§plan_needed: Option<String>

2.x plan_required: the lowest plan that includes feature (pro, team, enterprise).

Implementations§

Source§

impl HiveErrorDetailV1

Source

pub fn new(code: HiveErrorCode, message: impl Into<String>) -> Self

An error with only code and message.

Trait Implementations§

Source§

impl Clone for HiveErrorDetailV1

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HiveErrorDetailV1

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for HiveErrorDetailV1

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for HiveErrorDetailV1

Source§

impl PartialEq for HiveErrorDetailV1

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for HiveErrorDetailV1

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for HiveErrorDetailV1

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.