pub enum HiveErrorCode {
Show 22 variants
AuthorizationPending,
SlowDown,
ExpiredToken,
AccessDenied,
InvalidRequest,
Unauthorized,
PlanRequired,
ForbiddenRight,
UploadDisabled,
NotFound,
FeatureDisabled,
InstanceLimit,
RevisionConflict,
InvalidState,
LeaseExpired,
ScreeningRequired,
RateLimited,
UpgradeRequired,
InstanceRevoked,
QuotaExceeded,
PolicyDenied,
Unknown,
}Expand description
Machine-readable error code. Unknown codes from a newer service decode as
HiveErrorCode::Unknown and are handled by HTTP status.
Variants§
AuthorizationPending
400, device flow: the user has not approved yet; poll again after interval.
SlowDown
400, device flow: polling too fast; add 5 s to the interval.
ExpiredToken
400, device flow: the device code expired; start again.
AccessDenied
400, device flow: the user refused.
InvalidRequest
400: body failed validation or carried unknown fields.
401: access token missing, expired or not for this instance.
PlanRequired
402: the organization’s plan does not include Hive.
ForbiddenRight
403: the lease lacks the right this route needs.
UploadDisabled
403 with kind (1.4): the organization switched this upload off.
Stop that kind of upload and drop its queue until a lease allows it.
NotFound
404: unknown instance, vault, proposal or lease.
FeatureDisabled
404 with feature (Hive API.md “feature switches”): the operator
switched this feature off on this Hive (instance_metrics while
HIVE_ENGINE_METRICS is off). The route exists; try again much later.
InstanceLimit
409 with limit/used: every instance seat is taken.
RevisionConflict
409 with expected/actual: knowledge moved on.
InvalidState
409 with reason (1.5): the object is not in a state that allows
this.
LeaseExpired
401: the instance lease is past grace_until; renew or reconnect.
ScreeningRequired
422: the service screening refused content the engine should have removed.
RateLimited
429 with retry_after_s.
UpgradeRequired
426 with min_instance (also in the Hive-Min-Instance header).
InstanceRevoked
401 with revocation (C0 2.0 E12, §3.17.3): a workspace admin
revoked this instance; every engine route answers it until a new
connect. Never retried.
QuotaExceeded
Release B quotas (Hive API §8.1): resource, limit, used,
reset_at. Counted resources (registered_instances,
private_vaults) answer 409 (registered_instances in Personal adds
cooldown_days, reset_at = when a cooling-down slot frees);
monthly ones (transfer_bytes, bus_messages) answer 429 with
retry_after_s and Retry-After until reset_at. Never overage:
the engine waits, its outbox keeps local work.
PolicyDenied
403 with member (dotted policy path) and level (the outermost
level whose document refuses; consent refusals add action): Hive
itself enforces an x-enforcement: server policy member (§7.2).
Unknown
Any code this engine does not know.
Implementations§
Source§impl HiveErrorCode
impl HiveErrorCode
Sourcepub fn http_status(self) -> u16
pub fn http_status(self) -> u16
HTTP status the service answers with for this code.