#[non_exhaustive]pub enum ErrorCode {
Show 36 variants
InvalidRequest,
Unauthorized,
PermissionDenied,
ContentTooLarge,
NotSupported,
RouteNotFound,
MethodNotAllowed,
NamespaceNotFound,
NamespaceDeleted,
NamespaceExists,
ContentNotPrepared,
PathNotFound,
RevisionNotFound,
PathConflict,
DirectoryNotEmpty,
StaleHead,
StaleRevision,
NotDeleted,
WriterFenced,
WouldCycle,
CommitIdReuseConflict,
CommitOutcomeUnknown,
CommitQueueFull,
ServerBusy,
ShuttingDown,
CheckpointUnavailable,
MaintenanceRequired,
UploadNotFound,
UploadAlreadyCompleted,
UploadContentConflict,
RebootstrapRequired,
QueryUnindexable,
IndexLagging,
IndexCorrupt,
NamespaceCorrupt,
ServerError,
}Expand description
Stable machine-readable error reason.
This is the complete registry of code values carried by
ApiError bodies and embedded errors. Codes are
permanent once released: the API spec documents each code’s meaning and HTTP
status, and clients must tolerate codes they do not recognize.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidRequest
Carries the stable wire code invalid_request.
Carries the stable wire code unauthorized.
PermissionDenied
Carries the stable wire code permission_denied.
ContentTooLarge
Carries the stable wire code content_too_large.
NotSupported
Carries the stable wire code not_supported.
RouteNotFound
Carries the stable wire code route_not_found.
MethodNotAllowed
Carries the stable wire code method_not_allowed.
NamespaceNotFound
Carries the stable wire code namespace_not_found.
NamespaceDeleted
Carries the stable wire code namespace_deleted.
NamespaceExists
Carries the stable wire code namespace_exists.
ContentNotPrepared
Carries the stable wire code content_not_prepared.
PathNotFound
Carries the stable wire code path_not_found.
RevisionNotFound
Carries the stable wire code revision_not_found.
PathConflict
Carries the stable wire code path_conflict.
DirectoryNotEmpty
Carries the stable wire code directory_not_empty.
StaleHead
Carries the stable wire code stale_head.
StaleRevision
Carries the stable wire code stale_revision.
NotDeleted
Carries the stable wire code not_deleted.
WriterFenced
Carries the stable wire code writer_fenced.
WouldCycle
Carries the stable wire code would_cycle.
CommitIdReuseConflict
Carries the stable wire code commit_id_reuse_conflict.
CommitOutcomeUnknown
Carries the stable wire code commit_outcome_unknown.
CommitQueueFull
Carries the stable wire code commit_queue_full.
ServerBusy
Carries the stable wire code server_busy.
ShuttingDown
Carries the stable wire code shutting_down.
Carries the stable wire code checkpoint_unavailable.
MaintenanceRequired
Carries the stable wire code maintenance_required.
UploadNotFound
Carries the stable wire code upload_not_found.
UploadAlreadyCompleted
Carries the stable wire code upload_already_completed.
UploadContentConflict
Carries the stable wire code upload_content_conflict.
RebootstrapRequired
Carries the stable wire code rebootstrap_required.
QueryUnindexable
Carries the stable wire code query_unindexable.
IndexLagging
Carries the stable wire code index_lagging.
IndexCorrupt
Carries the stable wire code index_corrupt.
NamespaceCorrupt
Carries the stable wire code namespace_corrupt.
ServerError
Carries the stable wire code server_error.
Implementations§
Trait Implementations§
impl Copy for ErrorCode
Source§impl<'de> Deserialize<'de> for ErrorCode
impl<'de> Deserialize<'de> for ErrorCode
Source§fn deserialize<D>(
deserializer: D,
) -> Result<ErrorCode, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<ErrorCode, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
impl Eq for ErrorCode
Source§impl Serialize for ErrorCode
impl Serialize for ErrorCode
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnsafeUnpin for ErrorCode
impl UnwindSafe for ErrorCode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more